hi i have gridview control in that control i need to add and image in a cell how to do it in c#..... please help me thanks in advance....
A:
Just guessing:
This.YourDataGrid.Rows(0).Cells(0).Value = "yourStringHere";
This.YourDataGrid.Rows(0).Cells(1).Value = yourImageHere;
This.YourDataGrid.Rows.Add(new Object() {"yourStringHere", yourImage});
I'm not sure about the last line, how to inline an array, I just started coding in C#...
Edit: And make sure that the column is defined as a DataGridViewImageColumn.
Bobby
2009-11-26 09:18:36
here the problem is string is going for next cell ... i need like both string and imsge should add in 0th cell only...
RV
2009-11-26 09:39:33
@RV: That's not possible. I mean, workaround would be to create an image, draw the string _and_ the image into it and then show that one in the grid.
Bobby
2009-11-26 09:41:21