Im currently writing a simple app to display some data from a list of objects. Each object has the following members:
Now i want to display Name, Description as normal columns, but i want the Image to display an Image, so ive made an DataGridViewImageColumn, but the problem is that the image member is not enough to load the image. There is a repository which is set within the appconfig that specifies where images should be loaded from, so it would need to load an image from:
I did a DataGridView with a Picture column a while back. All I did was select an 'image' type column from an SQL database as part of my Data Set and attached the Data Set to my DataGridView. It worked fine in that scenario.
How are you adding the rows to your DataGridView. Are you mapping it to a DataSet?
Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......
Adding an DataGridViewImageColumn in is no worries, thats the easy part. The problem i have is that for each row in the table the image needs to take into account the image repository path, so as mentioned before i cant just tell it that the data member is the Image member of the object, as it needs to be prefixed with the AppConfig settings.
If that makes sense...
Last edited by Grofit; July 21st, 2009 at 03:25 AM.
Each row has a different image though, i read that i should latch onto the CellFormatting event and in there check its the right column and then if its not loaded, load it in there. Still not sure if this will work yet though