Mar 04, 2009, 6:02 AM
[CLOSED] grid search problem
i have a grid with paging toolbar:
<BottomBar>
<ext:PagingToolBar ID="ListPagination" runat="server" StoreID="SearchStore" PageSize="100">
<Plugins>
<ext:SlidingPager ID="SlidingPager1" runat="server">
<GetText Fn="function(s){return s.value}" />
</ext:SlidingPager>
</Plugins>
</ext:PagingToolBar>
</BottomBar>
and a search form triggered by this button:<ext:Button ID="btnSearch" runat="server" Text="#Search#" Icon="Magnifier" CausesValidation="true">
<Listeners>
<Click Handler="#{SearchStore}.reload();" />
</Listeners>
</ext:Button>
now the problem is that if I am viewing page 10 and search for something else and the number of pages is 5, the grid refreshes but i still view an empty page 10. How could I prevent it from behaving like that? reset the current page to 1 for example when clicking the search button?