By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,067 Members | 1,818 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,067 IT Pros & Developers. It's quick & easy.

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

P: 4
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
Jan 22 '09 #1
Share this Question
Share on Google+
3 Replies


Plater
Expert 5K+
P: 7,872
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
Jan 22 '09 #2

P: 4
pls..help me with the coding..
Jan 23 '09 #3

Plater
Expert 5K+
P: 7,872

Post your reply

Sign in to post your reply or Sign up for a free account.