Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. SQL Database pictures in datagridview

SQL Database pictures in datagridview

Scheduled Pinned Locked Moved C#
questiondatabaselearning
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hello I am new to this forum... I have a quick question... well I've created a Address Book, basically as my first program that I want to show my family.. On the first form it is all textboxes, datatimepicker, and a picturebox. You click the menu to open the DataGrid form I created.. in this I have a DataGridView. I have two problems. The DataGridView is always missing the first row of data. ID is the primary key and auto increments. It is always missing the first one... Also how do I get the table to display the image they chose with the person they added? I have the column as a image column but it will not display. The Picturebox is in the database. Here is how they load the picture: try { DialogResult result = new DialogResult(); OpenFileDialog openfile = new OpenFileDialog(); result = openfile.ShowDialog(); if (result == DialogResult.Cancel) { return; } else { picturePictureBox.Image = Image.FromFile(openfile.FileName); } } catch (Exception ex) { toolStripStatusLabel1.Text = ex.Message; } One --> how come the datagridview is missing a row all the time? two --> how do I get the picture to display in the datagridview? I will be adding something where they can print the information in this format: FirstName LastNAme Address City, State Zip Home Phone, Cell Phone, Fax I will get to this later, I am goign to try to figure that one out myself, but with the datagridview and the picture I have been messing with for a while and can just not figure it out.. Thanks

    C 1 Reply Last reply
    0
    • L Lost User

      Hello I am new to this forum... I have a quick question... well I've created a Address Book, basically as my first program that I want to show my family.. On the first form it is all textboxes, datatimepicker, and a picturebox. You click the menu to open the DataGrid form I created.. in this I have a DataGridView. I have two problems. The DataGridView is always missing the first row of data. ID is the primary key and auto increments. It is always missing the first one... Also how do I get the table to display the image they chose with the person they added? I have the column as a image column but it will not display. The Picturebox is in the database. Here is how they load the picture: try { DialogResult result = new DialogResult(); OpenFileDialog openfile = new OpenFileDialog(); result = openfile.ShowDialog(); if (result == DialogResult.Cancel) { return; } else { picturePictureBox.Image = Image.FromFile(openfile.FileName); } } catch (Exception ex) { toolStripStatusLabel1.Text = ex.Message; } One --> how come the datagridview is missing a row all the time? two --> how do I get the picture to display in the datagridview? I will be adding something where they can print the information in this format: FirstName LastNAme Address City, State Zip Home Phone, Cell Phone, Fax I will get to this later, I am goign to try to figure that one out myself, but with the datagridview and the picture I have been messing with for a while and can just not figure it out.. Thanks

      C Offline
      C Offline
      cola1973
      wrote on last edited by
      #2

      Hi,

      two --> how do I get the picture to display in the datagridview?

      maybe this can help you

      C 1 Reply Last reply
      0
      • C cola1973

        Hi,

        two --> how do I get the picture to display in the datagridview?

        maybe this can help you

        C Offline
        C Offline
        cola1973
        wrote on last edited by
        #3

        sorry, i forgot the Link http://msdn2.microsoft.com/de-de/library/system.windows.forms.listview.sorting(VS.80).aspx[] Greetings cola 1973 :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups