I have a EntityGridView with an associated GridViewSearchPanel. In the EntityGridView are several columns, one of which is a template field
<asp:TemplateField HeaderStyle-Width="17px">
<ItemTemplate>
<asp:ImageButton ID="imgAcc" runat="server" CommandName="AddAcc" CausesValidation="false" imageUrl="../Images/16-cube-green.png" tooltip="Add" />
</ItemTemplate>
<ItemStyle Width="10px" HorizontalAlign="Center" VerticalAlign="Middle"/>
<CONTROLSTYLE WIDTH="17" BORDERWIDTH="0" BORDERSTYLE="inset" />
</asp:TemplateField>
Everything works great in the EntityGridView before I do a search. When I do a search using the GridViewSearchPanel it filters the results like it should and everything works great.....until i click on the imageButton. The imageButton then executes a server-side method and when the page refreshes the EntityGridView is now showing the original unfiltered results...the EntityGridView still shows the user's search string.
I thought this might be something with the code that executes on click on my ImageButton, so I removed everything from the method and it still happens.
Also, on another page, i am using a ButtonField (see below) and the same thing happens.
<asp:buttonfield buttontype="image" commandname="add" imageUrl="../Images/16-cube-blue.png" >
<CONTROLSTYLE WIDTH="17" BORDERWIDTH="0" BORDERSTYLE="inset" />
</asp:buttonfield>
Also, I am putting the HandleGridViewSearchPanelState in the Page_Init on my pages for all of my GridViewSearchPanels.
protected void Page_Init ( object sender, EventArgs e )
{
FormUtil.HandleGridViewSearchPanelState ( gvspDWM );
}
Any ideas?
Thanks,
David