I am trying to define a column in a DataGridView as a LinkCell and I keep getting the following error:
"Value provided for cell template must of type 'Windows.System.Forms.DataGridViewTextBoxCell' or derive from it"
I've included my code:
Code:Private Sub FormatGrid3() Try grd3.RowHeadersVisible = False grd3.Columns(0).Width = 100 grd3.Columns(0).HeaderText = "Request ID" grd3.Columns(1).Width = 140 grd3.Columns(1).CellTemplate = New DataGridViewLinkCell grd3.Columns(1).HeaderText = "Image Name" grd3.Columns(2).Width = 430 grd3.Columns(2).HeaderText = "File Path" Catch ex As Exception ErrorHandler(strModule, strProcedure, Msg) End Try End Sub




Reply With Quote