Insert an Image in the specified cell - DataGridView

N

None

Hi,

I'm using DataGridView in my Windows Forms project. I need to know
how we can
insert an image into the specified cell [row,column].


I tried with the following code.


Bitmap bMap = new
Bitmap(@"D:\Images\xyz.gif");
DataGridViewImageColumn dgvICol = new DataGridViewImageColumn();
dgvICol.Image = bMap;
dgvOrders.Columns.Insert(5,dgvICol);


this is inserting image in all the rows of the specified column.


But i want to insert it in the RowHeaderMouseClick event that time i
know which row is clicked and already i have the column index Now i
want to insert the image in the specified cell. How Can i do this? If
anybody knows the solution please let me know it.


Thanks and Regards,
Vinothkumar B
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top