How to select the Gridview rows data in ?



It is very simple to do this functionality in

Step 1: Add the AutoGeneratedSelectButton=”true” in gridview like this

  <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 

Step 2: Fire the event “SelectedIndexChanged” and write the code for selecting rows

protected void GridView1_SelectedIndexChanged1(object sender, EventArgs e)
        string actualWt = GridView1.SelectedRow.Cells[2].Text;
        string amount = GridView1.SelectedRow.Cells[3].Text;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.