Results 1 to 4 of 4

Thread: how to pass values from datagridview into textbox?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    208

    Question how to pass values from datagridview into textbox?

    I am developing windows form application. i am a beginner.

    and i m using sql server 2005, VS 2008.

    i have a table customerInfoTbl which has 6 columns(customerID(primary Key), firstname, lastname,sex, age, salary)

    in form1 I have a datagridview1 that shows customer information, and a button called Select.

    datagridview1 has 5 columns( firstname, lastname, sex, age,salary)

    i just want to select any row in the datagridview1 then click the button Select, so that i want to show the data in form2 in textboxes(txtfirstname,txtlastname,txtsex,txtage,txtsalary these textboxes are found in form2 to show data from form1 on button select click)

    so can u show me how to do it? thanks

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

    Re: how to pass values from datagridview into textbox?

    Follow the CodeBank link in my signature and check out the thread on Updating Grid Row in Dialogue.
    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
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: how to pass values from datagridview into textbox?

    Quote Originally Posted by jmcilhinney View Post
    Follow the CodeBank link in my signature and check out the thread on Updating Grid Row in Dialogue.
    hi jmcilhinney, i dint find the code bank link? please assist me where do i find?

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

    Re: how to pass values from datagridview into textbox?

    My "signature" is the boilerplate text underneath all my posts. It doesn't contain all that many links and even fewer of them use the word "CodeBank".
    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