473,388 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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
Jan 22 '09 #1
3 4255
Plater
7,872 Expert 4TB
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
pls..help me with the coding..
Jan 23 '09 #3
Plater
7,872 Expert 4TB
OOP tutorial c# - Google Search
Jan 23 '09 #4

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

Similar topics

4
by: Dan | last post by:
Can anyone offer suggestions on how to do this or if it is possible? I have a form that uses a drop down box and 2 text fields. What I am trying to do is have the value of each text box set by...
2
by: dbuchanan | last post by:
Hello, I want to open a child form based on the record selected in a dataGridView of the parent form. I want the child form to open with a populated child table based on the selected parent...
5
by: Rob Dob | last post by:
Hi, I have two c# Winforms. the first form has a datagridview who's datasource is a bindingsource. when you double click on a datagridview row it then opens my second form, which has some...
4
by: gordon | last post by:
Hi I hav e a smallish app that has a datagridview. A user can select some columns in the datagrid, and i have a button that i would like to use to copy the rows that are selected to the...
1
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i...
0
by: romerve | last post by:
Hello, I am interested on how to edit/view an item or record selected from a DataGridView. The SQL queries for some data including the ID which is not visible on the GridView. I want to be...
9
by: =?Utf-8?B?UGV0ZXJX?= | last post by:
I have a TabControl on a Windows form in which I have various tab pages each with a DataGridView, the first column of which is a DataGridViewCheckBoxColumn and subsequent columns being...
0
by: EricW | last post by:
Hi The following code is in the load event of a form. When the user rightclicks on a row in a datagridview, the selected information is passed on to this form. Dim tbl As New Data.DataTable ...
2
by: cday119 | last post by:
Hi Everyone, So I have a datagridview and it has a column called status. It has 3 values: New, Printed, and Shipped. Now a user can select multiple rows and click "set to printed". I then do...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.