Oct 24, 2012, 5:18 AM
[CLOSED] Persist selected checkboxes across paginated grid
I reviewed a bunch of threads on this but nothing seems to work properly. I want to stay in the client side and not utilize the code behind. I assume that the Before on the button can call UpdateSelection somehow but i am not 100% of the ordering.
The end goal is that if i select items across multiple pages, when i press the button, all selected items are sent. I have gotten the code below to work (json is passed to controller) but it only works on current page.
Thanks!
My grid is below:
The end goal is that if i select items across multiple pages, when i press the button, all selected items are sent. I have gotten the code below to work (json is passed to controller) but it only works on current page.
Thanks!
My grid is below:
<ext:GridPanel
ID="GridPanelSearchResults"
runat="server"
Frame="true"
AutoHeight="true"
Hidden="true"
MaxHeight="400"
X="0"
Y="0"
AutoWidth="true"
AutoRender="false">
<Store>
<ext:Store ID="StoreSearchResults" runat="server" RemoteSort="false" AutoLoad="false">
<Proxy>
<ext:HttpProxy Method="GET" Url="/Search/FindData" />
</Proxy>
<BaseParams>
<ext:Parameter Name="start" Value="={0}" />
<ext:Parameter Name="limit" Value="={25}" />
</BaseParams>
<Reader>
<ext:JsonReader Root="data" IDProperty="id" TotalProperty="total">
<Fields>
<ext:RecordField Name="id" Type="Int" />
<ext:RecordField Name="firstName" Type="String" />
<ext:RecordField Name="lastName" Type="String" />
</Fields>
</ext:JsonReader>
</Reader>
<SortInfo Field="id" Direction="DESC" />
</ext:Store>
</Store>
<ColumnModel ID="ColumnModelResults" runat="server">
<Columns>
<ext:Column ColumnID="id" Header="Id" DataIndex="id" Width="50" Sortable="true" Hidden="true" />
<ext:Column ColumnID="firstName" Header="First Name" DataIndex="firstName" Width="100" Sortable="true" />
<ext:Column ColumnID="lastName" Header="Last Name" DataIndex="lastName" Width="100" Sortable="true" />
</Columns>
</ColumnModel>
<SelectionModel >
<ext:CheckboxSelectionModel runat="server" />
</SelectionModel>
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar"
runat="server"
PageSize="25"
DisplayInfo="true"
DisplayMsg="Displaying results {0} - {1} of {2}"
EmptyMsg="No results to display"
/>
</BottomBar>
<LoadMask ShowMask="true" />
</ext:GridPanel>
<ext:Button ID="ButtonUtilize" runat="server" Text="Utilize" Icon="Find">
<DirectEvents>
<Click
Url="/Assignment/Utilize/"
CleanRequest="true" >
<ExtraParams>
<ext:Parameter Name="ids" Value="Ext.encode(#{GridPanelSearchResults}.getRowsValues({selectedOnly : true}))" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
Last edited by Daniil; Oct 25, 2012 at 5:17 AM.
Reason: [CLOSED]