1. #1
    Ext User
    Join Date
    Sep 2007
    Posts
    20
    Vote Rating
    0
    mbalusu is on a distinguished road

      0  

    Default CheckboxSelectionModel PagingToolbar and x-grid3-hd-checker

    CheckboxSelectionModel PagingToolbar and x-grid3-hd-checker


    I searched through the forums but did not find an answer for this problem:

    1. I have a grid with 1st column being all checkboxes.

    2. If i check the header checkbox on the first page, all the rows correctly get selected, now I go to the next page, the header checkbox is still checked. I solved this using colModel.setColumnHeader(0, '<div class="x-grid3-hd-checker">\&\#160;</div>'); everytime we page.

    3. Now I go back to the first page, all the grid rows are selected, but the header row checkbox is unselected!!!. How do I solve this and still be able to click on the header checkboxes as make them work as intended on every page?

    Thanks!

  2. #2
    Ext User
    Join Date
    Dec 2007
    Location
    Italy
    Posts
    32
    Vote Rating
    0
    Emachan is on a distinguished road

      0  

    Default


    greetings mbalusu, as far as I understood...
    You are trying to select everything with the header checkbox is a paged grid.

    I think the only way to select everything on a paged grid is to keep a structure (an array or something similar) with all the elements in the grid, retrieving alll this elements from the server, not only the ones of the current page.
    The header checkbox works only selecting all records in the current page, so once you change the page you should check (almost manually) all new records, if you decided to select them all before.

    I think you could set this array in few minutes.

    Anyway you gave me a good hint about changing header checkbox status, thank you very much.

    Enjoy...
    EMA
    Make it happen...

  3. #3
    Ext User
    Join Date
    Sep 2007
    Posts
    20
    Vote Rating
    0
    mbalusu is on a distinguished road

      0  

    Default CheckboxSelectionModel PagingToolbar and x-grid3-hd-checker

    CheckboxSelectionModel PagingToolbar and x-grid3-hd-checker


    Wait, so does this mean, in serverside sorting and paging, ExtJs does not support CheckboxSelectionModel? Right now when the first page's header checkbox is selected and then the user goes to the next page, the header checkbox is still selected in the 2nd page, so then, I am responsible for manually checking the checkboxes in all the rows? Shouldn't the Ext Api do that (when it see's oh this is a serverside paging grid). This sounds like a bug, either way...Somebody please get back, we have to release today evening!

  4. #4
    Ext User
    Join Date
    Sep 2007
    Posts
    20
    Vote Rating
    0
    mbalusu is on a distinguished road

      0  

    Default


    I think this is a bug and this is the way I solved it:

    var grid = Ext.getCmp('ResultsGrid');
    if(grid)
    {
    var view = grid.getView();
    var cell = view.getHeaderCell(0);
    var hd = Ext.fly(cell.firstChild);
    if(hd)
    {
    hd.addClass('x-grid3-hd-checker-on');
    }
    }

    Does anybody find anything wrong with this?
    Last edited by mbalusu; 30 Mar 2008 at 1:48 PM. Reason: Found solution (i think)

  5. #5
    Ext User
    Join Date
    Dec 2007
    Location
    Italy
    Posts
    32
    Vote Rating
    0
    Emachan is on a distinguished road

      0  

    Default


    I know.... I feel it weird too...

    But I also think PagingToolbar is something born later.
    Probably not yet well integrated into every feature of the grid.
    I solved my problems more or less like you... forcing header uncheck when no needed, and checking "manually" those lines that are in different pages, that I can retrieve only through a server action.

    Good luck!!
    EMA
    Make it happen...

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."