I have a DataGridView that I would like all values on a specific row passed to a new form. I know how to extract the values, but how should I pass these values into the new form (each will be assigned to a specific textbox)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you want to hide the rest of the DataGridView from the new form? For instance if you pass a DataGridViewRow to the form the new form can get the values directly. But that would also give them access to the DataGridView.
If you want to remove access to the DataGridView then place the values in the row into a container and pass that container. You could use something built in like an ArrayList, List, etc.. or create your own custom container.