Click here to Skip to main content
15,916,949 members
Home / Discussions / C#
   

C#

 
GeneralRe: Encryption Pin
Richard Andrew x6424-Jul-07 11:45
professionalRichard Andrew x6424-Jul-07 11:45 
GeneralRe: Encryption Pin
Christian Graus24-Jul-07 12:05
protectorChristian Graus24-Jul-07 12:05 
GeneralRe: Encryption Pin
ekynox24-Jul-07 14:28
ekynox24-Jul-07 14:28 
GeneralRe: Encryption Pin
Richard Andrew x6424-Jul-07 14:32
professionalRichard Andrew x6424-Jul-07 14:32 
Questionresend mouse messages Pin
likefood24-Jul-07 11:07
likefood24-Jul-07 11:07 
AnswerRe: resend mouse messages Pin
Dave Kreskowiak24-Jul-07 13:05
mveDave Kreskowiak24-Jul-07 13:05 
GeneralRe: resend mouse messages Pin
likefood25-Jul-07 3:19
likefood25-Jul-07 3:19 
QuestionHow to access an image in DataTable? Pin
Khoramdin24-Jul-07 10:51
Khoramdin24-Jul-07 10:51 
Hello everyone,

I have a DataGridView controll which is populated by a table from a remote database. One of the Columns contains images which I am using the following line of code to access the images in the DataGridView.

System.Drawing.Image itemOriginalImage = (Image)dataGridView1.Rows[ItemRowIndex0].Cells["item_image"].FormattedValue;<br />


I wish to remove the DataGridView and replace it with a DataTable. I was wondering how I can access the image column in the DataTable?

I am using this code but I am unable to set the format right.

System.Drawing.Image itemOriginalImage = (Image)myTable.Rows[ItemRowIndex0].ItemArray.GetValue(6).<br />


I get the following error for the above line of code. "Unable to cast object of type 'System.Byte[]' to type 'System.Drawing.Image'."

Can someone be kind enough to tell me how I can access the image in my DataTable?

Thank you very much and have a great day.

Khoramdin
AnswerRe: How to access an image in DataTable? Pin
Pete O'Hanlon24-Jul-07 10:58
mvePete O'Hanlon24-Jul-07 10:58 
Questionstrings Pin
seemamltn24-Jul-07 10:44
seemamltn24-Jul-07 10:44 
AnswerRe: strings Pin
Pete O'Hanlon24-Jul-07 10:52
mvePete O'Hanlon24-Jul-07 10:52 
AnswerRe: strings Pin
BoneSoft24-Jul-07 10:52
BoneSoft24-Jul-07 10:52 
AnswerRe: strings Pin
Christian Graus24-Jul-07 10:56
protectorChristian Graus24-Jul-07 10:56 
AnswerBAD USER! Pin
leckey24-Jul-07 16:29
leckey24-Jul-07 16:29 
QuestionProlem in inserting new Row-DB2 Date Time Pin
kidus124-Jul-07 9:59
kidus124-Jul-07 9:59 
AnswerRe: Prolem in inserting new Row-DB2 Date Time Pin
kubben24-Jul-07 10:28
kubben24-Jul-07 10:28 
QuestionInteracting With a Database Pin
max2929724-Jul-07 9:58
max2929724-Jul-07 9:58 
AnswerRe: Interacting With a Database Pin
Pete O'Hanlon24-Jul-07 10:06
mvePete O'Hanlon24-Jul-07 10:06 
GeneralRe: Interacting With a Database Pin
max2929724-Jul-07 10:15
max2929724-Jul-07 10:15 
GeneralRe: Interacting With a Database Pin
Pete O'Hanlon24-Jul-07 10:24
mvePete O'Hanlon24-Jul-07 10:24 
GeneralRe: Interacting With a Database Pin
max2929724-Jul-07 10:27
max2929724-Jul-07 10:27 
QuestionRe: Interacting With a Database Pin
max2929724-Jul-07 10:34
max2929724-Jul-07 10:34 
AnswerRe: Interacting With a Database Pin
Christian Graus24-Jul-07 11:23
protectorChristian Graus24-Jul-07 11:23 
QuestionData Binding with CheckBox Pin
Jan Hirak24-Jul-07 9:29
Jan Hirak24-Jul-07 9:29 
Questionloop through a bindingsource Pin
crash89324-Jul-07 9:08
crash89324-Jul-07 9:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.