I have one issue regarding the DataGridView in C#.
I want to display an empty DataGridView with 256 cells (i.e. 8 columns X 32 rows) on main form load event, but i dont have any datasource to populate it. Instead I am pulling my data from a hardware dynamically. After every 5 secs, I read data from a hardware and then populate the DataGridView. I want to display images in each cell and write text over these image.
Can anyone help me out?
Mahesh ChandPosted Nov 23, 2008, 11:47 AM
It seems like you will have to create a DataSet in memory with 256 cells with empty strings in them or at least 32 rows with each row having empty values and use that DataSet in the data binding. To create an emply DataSet, Create a DataTable, add rows and columns to it and add that to the DataSet using DataSet.Tables.Add(DataTable);
You can update rows in a DataTable using this article:
Update and Delete Rows in a DataTable
Hope it gives you some pointers.