[CLOSED] Persist selection over pagination

  1. #1

    [CLOSED] Persist selection over pagination

    Hi all,

    I saw that for the SelectionModels (Row, Checkbox and Cell) if you navigate through pages in a paginated grid
    the selections are lost. Is there a solution for that?

    In ExtJs forum people suggest this:

    
    onBeforeLoad : function(store , options){
      options.params = Ext.apply(options.params || {}, {items:this.checkedItems});
    }
    but I didn't find a way for implementing it.

    P.S. For the next future.... :) it would be useful to add this to examples.

    Thanx a lot

    Matteo


  2. #2

    RE: [CLOSED] Persist selection over pagination

    Hi Geoff,

    I saw you add this code for /GridPanel/Selection_Models/Checkbox_Selection/Default.aspx

    
        <Listeners>
              <BeforeLoad Handler="options.params = Ext.apply(options.params || {}, {items:this.checkedItems});" />
        </Listeners>
    but the problem still remains. I need to see the selections made (rows checked) after I navigate from one page to another.
    Is there a solution for that?

    Thanx a lot

    Matteo
  3. #3

    RE: [CLOSED] Persist selection over pagination

    I did add the code you provided earlier to the example to test, but it doen't work, and I forgot to remove.*

    I'm going to look into finding another solution. I'll be sure to update this thread when I know more details.*


    Geoffrey McGill
    Founder
  4. #4

    RE: [CLOSED] Persist selection over pagination

    Hi Geoff,

    this reply only as a memo.

    Very important.

    Here: http://extjs.com/forum/showthread.ph...tion+selection

    people suggested a solution, don't know if usefull, anyway to difficult to me to implement it!

    Thanx a lot

    Matteo
  5. #5

    RE: [CLOSED] Persist selection over pagination

    Hi Matteo,

    Thanks for the link. I added the plugin presented in the forum to an existing GridPanel+CheckboxSelectionModel*sample and it's almost working. Just a few bugs to work out. We'll spend some time on this and see if we can get it working 100%.*


    Geoffrey McGill
    Founder
  6. #6

    RE: [CLOSED] Persist selection over pagination

    Hi Geoff,

    REALLY GREAT!! , I'll try it and let you know.

    Thanx a lot

    Matteo
  7. #7

    RE: [CLOSED] Persist selection over pagination

    Hi Geoff,

    I saw sandbox code, good!
    As you said before, you're working on this, yes I know.

    Anyway I'd like to make some considerations on it, having tried the code, hope you'll agree.

    Now when you click on Ajax Postback button people get the selected rows of the page you're in.
    What I (people should) need now is getting the selected rows of the entire Grid, isn't it. This as priority.

    BUT

    imho, what can be considered as bug now, can be a precise feature and that is:
    getting values (selected rows) of the page you're in!

    I tried to find something that links the SelectionModel with the pagination of the grid, but nothing.
    I serached for that in ext docs, but it seems that there is no link between the SelctionModel and the Pagination or GridPanel. Am I wrong???

    I try to explain me with this lines of code:

    
    RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
    
    /// CODE I WOULD USE
    // this does not exist!
    gridSelectedRows = sm.GetSelectedRows(actualPageIndex); // only selected rows of the page you're in
    // or
    gridSelectedRows = sm.SelectedRows; // all selected rows of the grid, doesn't matter of the actual page 
    ///
        
        foreach (SelectedRow row in gridSelectedRows)
            {
                result.Append("<li>" + row.RecordID + "</li>");
            }
    well... all this if tecnically possible!

    Thanx

    Matteo
  8. #8

    RE: [CLOSED] Persist selection over pagination

    Hi Geoff,

    I saw the change in examples section, great!
    It works fine, well done!

    Thanx a lot

    Matteo

Similar Threads

  1. Persist selection with pagination
    By testix in forum 1.x Help
    Replies: 6
    Last Post: May 21, 2014, 12:35 PM
  2. Replies: 0
    Last Post: Mar 19, 2012, 3:08 PM
  3. [CLOSED] How to persist Ext.Net controls in VS2010 toolbox?
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 02, 2012, 12:42 PM
  4. Replies: 1
    Last Post: Jun 21, 2010, 3:42 PM
  5. [CLOSED] Possible bug: Viewstate doesn't persist
    By drgw74 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 03, 2009, 5:00 AM

Posting Permissions