Results 1 to 3 of 3

Thread: [2005] DataGridView

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Kolkata, India
    Posts
    290

    [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

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    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.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width