I'm having a slight issue displaying images in my DataGridView...
I am importing a CSV file to a datatable No problem.
I am then naming the column names like so dt.columns(0) = "Name" etc..
no problem so far..
I have a routine that looks for text and replaces it with an image, this also works as long as I create the column like so:
.Columns.AddRange( _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewImageColumn()) ' Note that my last column is an image column...
Now, I use this command to import the datatable in to the datagrid:
dataGridView1.DataSource = dt
Of course I can't use the above method to create the image column as it will just add columns after ones I've already created so how can I change the datagridview column to display images before I use:
dataGridView1.DataSource = dt??
I need to be able to bind to the datatable and still be able to display images.
Any help would be great.
I am importing a CSV file to a datatable No problem.
I am then naming the column names like so dt.columns(0) = "Name" etc..
no problem so far..
I have a routine that looks for text and replaces it with an image, this also works as long as I create the column like so:
.Columns.AddRange( _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewTextBoxColumn(), _
New DataGridViewImageColumn()) ' Note that my last column is an image column...
Now, I use this command to import the datatable in to the datagrid:
dataGridView1.DataSource = dt
Of course I can't use the above method to create the image column as it will just add columns after ones I've already created so how can I change the datagridview column to display images before I use:
dataGridView1.DataSource = dt??
I need to be able to bind to the datatable and still be able to display images.
Any help would be great.