Murray Brown
asked on
ASP.net populate extra column in GridView through button click
Hi.
I have a GridView on my ASP.net site that has an extra column containing buttons
and another containing labels. When I click the button in one row I have managed to populate the label column with text. The only problem is that when I click the next row it clears the label populated in the other one. I need to stop this from happening
I have a GridView on my ASP.net site that has an extra column containing buttons
and another containing labels. When I click the button in one row I have managed to populate the label column with text. The only problem is that when I click the next row it clears the label populated in the other one. I need to stop this from happening
Private Sub GridView2_RowCommand1(sender As Object, e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView2.RowCommand
Try
Dim index As Integer = Convert.ToInt32(e.CommandArgument)
' Retrieve the row that contains the button
' from the Rows collection.
Dim row As GridViewRow = GridView2.Rows(index)
row.Cells(0).Text = "Strongly Agree"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER