|
-
Sep 8th, 2007, 04:40 AM
#1
Thread Starter
Hyperactive Member
[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
-
Sep 8th, 2007, 09:15 AM
#2
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.
-
Sep 8th, 2007, 08:43 PM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|