G
Guest
<asp:GridView ID="gridResults" runat="server" AutoGenerateColumns="False"
Width="98%" PageSize="25" AllowPaging="True" OnSorting="gridResults_Sorting"
OnPageIndexChanging ="gridResults_PageIndexChange" AllowSorting="True"
OnRowDataBound="gridResults_RowDataBound" EnableViewState="False"
OnRowCommand="gridResults_Command" ></asp:GridView>
Inside a <ItemTemplate> I have an <asp:ImageButton>
The problem is that no matter what I do, clicking the imagebutton or even a
regular button within the grid will not fire the
OnRowCommand="gridResults_Command". It postback the page but never executes
the event.
HOWEVER, if I click on SORT headers or paging footers, OnRowCommand fires
EVERY time. What is the deal? Why doesn’t OnRowCommnad event fire for buttons
in the grid? Even if I set EnableViewState = true on the gridview, nothing
other then sorting and page will fire OnRowCommand ïŒ
Width="98%" PageSize="25" AllowPaging="True" OnSorting="gridResults_Sorting"
OnPageIndexChanging ="gridResults_PageIndexChange" AllowSorting="True"
OnRowDataBound="gridResults_RowDataBound" EnableViewState="False"
OnRowCommand="gridResults_Command" ></asp:GridView>
Inside a <ItemTemplate> I have an <asp:ImageButton>
The problem is that no matter what I do, clicking the imagebutton or even a
regular button within the grid will not fire the
OnRowCommand="gridResults_Command". It postback the page but never executes
the event.
HOWEVER, if I click on SORT headers or paging footers, OnRowCommand fires
EVERY time. What is the deal? Why doesn’t OnRowCommnad event fire for buttons
in the grid? Even if I set EnableViewState = true on the gridview, nothing
other then sorting and page will fire OnRowCommand ïŒ