I have gridview1
on sample.asp
page. It has about 15 rows. What i want to do is:
If i click on a row (say row 7) in the gridview1, it should update a few other rows (say rows 2,3,4) in the same gridview. On clicking the row, I want to call the function UpdateOnClick()
that is already present in the sample.asp.cs
file. This function should change the values in the desired rows on the same gridview.
I want to update a few other rows on the same gridview
how can i achieve this?
You can call the UpdateOnClick from the OnRowCommand, the CommandEventArgs (which most people call e) gives the selected row in its CommandArgument property.
From this, you can iterate through the rows to find the ones you want. This should give you enough copy and paste food anyway: