Results 1 to 3 of 3

Thread: [RESOLVED] [2008] Textboxes add row to datagridview

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Posts
    134

    Resolved [RESOLVED] [2008] Textboxes add row to datagridview

    I have 4 textboxes
    I want to add a row to a datagridview


    datagridview1.rows.add ( txtbox1.text txt box2.txt .... )


    Help me. Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2008] Textboxes add row to datagridview

    Looking at the documentation for the DataGridView.Rows property we see it is type DataGridViewRowCollection. Looking at the documentation for the DataGridViewRowCollection.Add method we see that it is overloaded. It can accept no parameters, a DataGridViewRow object, and Integer or an Object array. Having read the documentation for each one, which do you think is most appropriate for your circumstances?
    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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Posts
    134

    Re: [2008] Textboxes add row to datagridview

    ok I read the documentation for the rows and I found how... thanks

    datagridview1.rows.add(txtbox1.text, txtbox2.text, txtbox3.text)

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