I have a dynamically created GridView control in my Windows Forms application. Basically I set the GridView data source equal to a DataTable
object. Everything works well. Basically my data reader object consists of two columns of data, where the first column of data is empty.
I wanted it to be empty, because somehow I would like to insert an image into the first column before the windows form with the GridVIew is
displayed to the screen.Below is some of the code which will give you an idea of what I am doing.
So basically my question is how can I dynamically insert an image into an GridView row of the first column.
Dim table as New DataTable()
Using Command as New SqlCommand(mySqlQuery,connection)
Using reader As SqlDataReader = command.ExecuteReader()
DataGridView2.DataSource = table ' populate the grid