how do i edit a selected row in datagrid?

Jun 3 2007 10:17 AM

i am using dotnet 2003.i am doing my project in vb.net windows application.i have two form in my project.first form is datagrid .In second form label and textboxes are avilable to save the entering values in datagrid of first form through this 2nd form.my problem is,if i select the row or record and click edit menu means,want to display  the values of that selected row in textboxes of second form.
for example,
in first form,
there are 4 columns named as name,age,rollno,address in datagrid.
values are ramu for namecolumn,24 for age column,42 for rollno column,cbe for address column.now values in datagrid like below
       name                age                  rollno                    address
        ramu                24                      42                        cbe

in 2nd form,there are 4 label and 4 textbox.textbox arenamed as nametextbox,agetextbox,rollnotextbox,addresstextbox.
my problem is,
in first form,
if i select the row(ie.,ramu,24,42,cbe) and i click edit menu means,i want to display the values automatically (ramu in nametextbox,24 in agetextbox,42 in rollnotextbox,cbe in addresstextbox)in 2nd form.
during runtime in vb.net windows application.so how i automatically display the values of row in each textbox.plz help me.

 


Answers (1)