-
[2005] DataGridView
I have populate the DataGridView through DataAdapter.
How can I add additional field in DataGridView for Serial Number & CheckBox
[VBCODE]
Dim daView As SqlDataAdapter
Dim dtView As New DataTable
Dim SqlString As String
lblTable.Text = TableName
SqlString = "select * from " & TableName
Try
daView = New SqlDataAdapter(SqlString, Con)
daView.Fill(dtView)
dgView.DataSource = dtView
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
[/VBCODE]
thanks
-
Re: [2005] DataGridView
You manually add a datagrdviewtextboxcolumn and a datagridviewcheckboxcolumn to the datagridview. It is easiest to do it in design mode. Click on the DGV to select it, then in property explorer, click on the button for the Columns property, then add the columns as you need.
-
Re: [2005] DataGridView