C# .NET - Problem In Read Image From Datagrid.

Asked By ALOK RANJAN on 23-Apr-12 03:00 AM
hi everyone........
                         I have scenario that when I insert image from picture box control  in database also it reflect at Data grid at the time of insertion . when we double click on data grid cell to update that record all values we can read easily In Textbox from data grid but i am unable to read image value from data grid cell how i can resolved this problem .

error occur Like Error 45 Cannot implicitly convert type 'string' to 'System.Drawing.Image'

please help me......... 

LIJO PHILIP replied to ALOK RANJAN on 23-Apr-12 11:28 PM
can you please paste the code here ?? if then i might be able to help
LIJO PHILIP replied to ALOK RANJAN on 23-Apr-12 11:34 PM
most common cause is this

The return type of the function should be 
Image not string. please provide the code if this doesnt work
[)ia6l0 iii replied to ALOK RANJAN on 26-Apr-12 12:19 AM
If you are trying to read the image from the DataGrid/Or any other datasource, then you should cast it to the right type. 
In my humble opinion, you read the cell's text and you are trying to assign to a property that is of type Image. 

Something like this:
Image img = e.Cells[1].Text;

Please post your code for more accurate answers. 

Hope this helps.