Adding image type column in typed data table/set

  • Thread starter Thread starter Ashutosh
  • Start date Start date
A

Ashutosh

Hi,
How can I add an image type column in a typed data set/table? In the data
set designer, the data types available for selection doesn't include the
Image type.

I am not using any backend database. I just need to create a typed data
table with one of the columns as image type.

Regards,
Ashu
 
Ashutosh said:
Hi,
How can I add an image type column in a typed data set/table? In the data
set designer, the data types available for selection doesn't include the
Image type.

I am not using any backend database. I just need to create a typed data
table with one of the columns as image type.

Regards,
Ashu

Check this reference for datatypes that can be used in a DataColumn in a
DataTable:

http://msdn.microsoft.com/en-us/library/system.data.datacolumn.datatype.aspx
 
Hi,
Thanks for the reply, but the link you pointed, I am already aware of those
things. It doesn't talk anything about the image.

I need to use a typed data table, not an un-typed table.

The designer doesn't allow any type other than the ones listed on the link
you provided.

Even if I set the data type to byte[], then there are two issues
1) How do I set value for that column ( I have the image in Image class'
object). I don't see any method to convert Image type to byte array. NOTE: I
am loading the images from the resource file.

2) I need to bind this table to data grid view. So, how does data grid view
knows that this column contains image (I think this can be done by setting
the column type, but I am not sure).


Regards,
Ashutosh
 
Back
Top