[CLOSED] CheckBoxSelectionModel with paging in Gridpanel Problem

  1. #1

    [CLOSED] CheckBoxSelectionModel with paging in Gridpanel Problem

    I want to copy all selection in Gridpanel to other Grid. But at present i can copy only those records which are in current page i cant copy selected records from other pages.

    Gridpanel Code
     <ext:GridPanel 
              ID="GvPnl" 
              runat="server"
              SelectionMemory="Enabled"
              StripeRows="true"
              Icon="Table"
              Width="470"
              Height="200"
              TrackMouseOver="true"
              StoreID="dsData">
     <ColumnModel>
                  <Columns>
                       <ext:Column Width="90" Header="ID" ColumnID="ID" DataIndex="ID" />
                       <ext:Column Width="90" Header="Name" ColumnID="Name" DataIndex="Name" />
                   </Columns>
       </ColumnModel>
       
       <SelectionModel>
             <ext:CheckboxSelectionModel ID="CheckboxSelectionModelsearch" runat="server">
             </ext:CheckboxSelectionModel>
        </SelectionModel>
    </ext:GridPanel>
    Store Code
    <ext:Store runat="server" ID="dsData" AutoDataBind="true" RemoteSort="true" AutoLoad="false">
             <Proxy>
                <ext:HttpProxy Url="/Data/SearchName/" />
             </Proxy>
            <Reader>
                <ext:JsonReader IDProperty="ID" Root="data" TotalProperty="total">
                    <Fields>
                        <ext:RecordField Name="ID"/>
                        <ext:RecordField Name="Name" />                
                  </Fields>
                </ext:JsonReader>
            </Reader>
             <BaseParams>
                <ext:Parameter Name="start" Value="={0}" />
                <ext:Parameter Name="limit" Value="={5}" />
            </BaseParams>
    </ext:Store>
    javascript for copy records
    var CopyRows = function () {
                var ds = GvPnl.getStore();
                var SelectedRows = GvPnl.getSelectionModel().getSelected()
            }
    Last edited by Daniil; Jun 04, 2011 at 9:18 AM. Reason: [CLOSED]
  2. #2
    Hi,

    There is the current page records on client side. So, you can't avoid server side to copy all records.
  3. #3
    Is there any solution to this? Any way to do paging on Client Side and then copy records?
  4. #4
    Well, local paging is the solution if you don't need remote paging. But you should remove HttpProxy and load data to the store manually.
  5. #5
    well am using MVC and Client paging will create problem as records can exceeds 8000 in my case.
  6. #6
    Sure, I understand.

    So, the single way to achieve your requirement:

    1. Retrieving all selected records ids from
    GridPanel1.selectedIds
    object

    2. Passing them on server side (DirectEvent/DirectMethod) to get records values and:

    • Call .DataBind() for the store

    or

    • Return these values to client side to call .loadData() for the store

Similar Threads

  1. Replies: 3
    Last Post: Jan 19, 2012, 4:42 PM
  2. GridPanel Remote Paging Problem
    By zhangjiagege in forum 1.x Help
    Replies: 6
    Last Post: Nov 22, 2011, 8:17 AM
  3. [CLOSED] Problem when paging gridpanel in AjaxEvent
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Nov 11, 2010, 11:30 AM
  4. Replies: 5
    Last Post: Dec 12, 2008, 2:09 PM
  5. gridpanel getSelections problem with paging
    By Lex in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 30, 2008, 1:30 PM

Tags for this Thread

Posting Permissions