How to pass the selected row values to a form in DataGridView in C#.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tanuja5
    New Member
    • Jan 2009
    • 4

    How to pass the selected row values to a form in DataGridView in C#.net

    hi....
    I want to know how to pass the data's of the checked checkbox row in DataGridView to a form at run-time.I have a GridView (with 4 columns) which i have binded to the database,and i created a checkbox column in the grid view, I kept a button below the form which i named as "modify" and i created a second form with 4 textboxes and a "update" button.If a user at run time checks a particular row and clicks the "modify" button ,the data's in each cell should be passed to the second form's textbox field so that the user can make changes and if he clicks on "update" button on the second form the database table should be updated.I am using access database.I am beginner in C#.net and i donno how to proceed with it.Kindly help me with the code
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Make your second form have a constructor that takes a DataGridViewRow (or DataGridViewRow[] if need be), then you can pass in the correct row(s) and deal with them

    Comment

    • tanuja5
      New Member
      • Jan 2009
      • 4

      #3
      pls..help me with the coding..

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        OOP tutorial c# - Google Search

        Comment

        Working...