Click here to Skip to main content
12,072,640 members (68,803 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# C#4.0
Pls Help me Very Quickely, I am in lot of problem.Thanks in advance.
I want hedaer value in select index changed event.
protected void Grid_SelectedIndexChanged(object sender, EventArgs e)
           lblid.Text = Grid.SelectedRow.Cells[0].Text;
              // Grid.SelectedRow.Cells[1].Text = "B";
           lblid1.Text = Grid.SelectedRow.Cells[1].Text;
       catch (Exception ex)
           lblmsg.Text = "Error! " + ex.Message;
My grid View Code behind is
<asp:GridView ID="Grid" runat="server" EmptyDataText="No Record Found." PageSize="30"
                       AllowPaging="True" AutoGenerateColumns="False" AllowSorting="True" DataKeyNames="id"
                       CssClass="grid" Width="100%"
                <asp:BoundField DataField="membername" HeaderText="25Memeber Name" ReadOnly="True" HeaderStyle-Width="80px" />
               <asp:CommandField ButtonType="Image" HeaderText="B" NewText="B"
                          ShowSelectButton="True" >
                            <HeaderStyle Width="90px" />
Posted 28-Dec-12 2:47am
Edited 28-Dec-12 2:48am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.160208.1 | Last Updated 28 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100