Results 1 to 3 of 3

Thread: datagridview cell format

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2004
    Posts
    277

    datagridview cell format

    hihi.

    i am currently using the daatgridview to display my image under the column of the datagridview. but i cant add text under the same column below the image. how can i add text to the column. i need the text for the image descripton.

    how can i set the cell fromat in a loop where alternaltive it will set it as DataGridViewImageColumn then the next row as DataGridViewTextBoxColumn?


    ???
    ocw

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: datagridview cell format

    Notice the names you're using: DataGridViewImageColumn and DataGridViewTextBoxColumn. That's a clue that the type applies to the entire column. The DataGridView is basically a visual representation of data that is, or could be, stored in a database. A database will not allow you to store text and images in the same column. You'll need to put the text for each image in an adjacent column.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2004
    Posts
    277

    Re: datagridview cell format

    thanks jmcilhinney, for the suggestion.

    i have encountered a new problem which is that if the gridveiwimagecolumn did not have an image inserted, it will show an image with a cross in the square box. how can i get rid of that?

    ???
    ocw

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width