Tuesday, 3 September 2013

Unable to select my gridview row of data

Unable to select my gridview row of data

I've added a gridview into my asp.net webapp. I also added a select button
in the gridview. However, when i click the select button in the gridview,
i receive this error

Here is my gridview code
<asp:GridView ID="gvnric" runat="server" Align="Center" Width="30%"
BackColor="#CCCCCC" AllowSorting="true" OnSorting="gvnric_Sorting"
BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px"
CellPadding="4"
CellSpacing="2" ForeColor="Black" AutoGenerateSelectButton="True"
OnSelectedIndexChanged="gvnric_SelectedIndexChanged"
AllowPaging="True"
PageSize="5" OnPageIndexChanging="gvnric_PageIndexChanging">
<FooterStyle BackColor="#CCCCCC" />
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black"
HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True"
ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />
</asp:GridView>
This format of my gridview code is working out fine for my other page but
not for my current one. Why is this so?
I found this link which asked similiar question but it doesn't help.

No comments:

Post a Comment