1. #41
    Sencha User
    Join Date
    Dec 2008
    Location
    NYC
    Posts
    182
    Vote Rating
    0
    whodat is on a distinguished road

      0  

    Default


    Hi Condor,

    I'm using CheckboxSelection for my grid. The original implementation does not take into effect paging and keeping the state of which records are selected. So I've decided to add a dataIndex to my record 'initialCheckboxValue'

    Code:
    reader: new Ext.data.JsonReader({totalProperty: 'size', root: 'data', id: 'employeeId'}, 
    ['employeeName', 'dept', 'supervisor','teamLeader', 'employeeId', 'deptId', 'initialCheckboxValue'])
    Altering this PagingStore class, I added the following method below to be called when a select and deselect event has been fired.
    Code:
    setCheckboxProperty: function(record, value){
            var index=this.allData.items.indexOf(record);
            this.allData.items[index].set('initialCheckboxValue', value);
            this.fireEvent("datachanged", this);
    },
    What I don't know is if I should be firing the "datachanged" event when a record is updated? Or should I should I be calling another PagingStore class method instead.

  2. #42
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Wouldn't it be easier to use a CheckColumn (from the edit-grid example) or a SmartCheckBoxSelectionModel?

  3. #43
    Sencha User
    Join Date
    Dec 2008
    Location
    NYC
    Posts
    182
    Vote Rating
    0
    whodat is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    Wouldn't it be easier to use a CheckColumn (from the edit-grid example) or a SmartCheckBoxSelectionModel?
    I was using SmartCheckBoxSelection, but it does not keep the state of the record which was check for some reason when paging locally.

    What SmartCheckboxSelection does is
    Code:
    var record = this.grid.store.getAt(rowIndex);
    But that doesn't update the value in the allData mixedCollection, correct? So when I come back to that page, the checkbox gets unselected.

    Have you used the combination?

  4. #44
    Sencha User
    Join Date
    Dec 2008
    Location
    NYC
    Posts
    182
    Vote Rating
    0
    whodat is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    Wouldn't it be easier to use a CheckColumn (from the edit-grid example)
    I'll try the check column in the editor grid example next. I don't like the idea of altering the paging store either. Would this CheckColumn keep the state when paging locally? I guess there's only one way to find out.

    thanks for the response

  5. #45
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    checkboxmodel of the ExtJS not maintains the default state across paging, you need a plugin like this:

    http://extjs.com/forum/showthread.php?p=296037

    Greetings,

  6. #46
    Ext User
    Join Date
    Apr 2009
    Posts
    1
    Vote Rating
    0
    pvghotikar is on a distinguished road

      0  

    Default PagingStore Downloadable link

    PagingStore Downloadable link


    Hi,

    Can you pls provide me the downloadable link for the code.
    I tried the link on the first page...not able to open the zip file.

    Prashant

  7. #47
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Use a different browser (IE corrupts downloads from the forum).

  8. #48
    Ext User
    Join Date
    Mar 2009
    Posts
    26
    Vote Rating
    0
    ash_rocks is on a distinguished road

      0  

    Default


    Hi Condor,

    When I try to open the zip file, I get an error: Compressed (zipped) folder is invalid or corrupted..

    Any idea what I need to do to open the zip folder?

    Thanks,

  9. #49
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    As Condor mentioned previously, IE does not do well downloading zips from the Forum. Use Firefox instead.


    Quote Originally Posted by ash_rocks View Post
    Hi Condor,

    When I try to open the zip file, I get an error: Compressed (zipped) folder is invalid or corrupted..

    Any idea what I need to do to open the zip folder?

    Thanks,
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  10. #50
    Ext User
    Join Date
    Mar 2009
    Posts
    26
    Vote Rating
    0
    ash_rocks is on a distinguished road

      0  

    Default


    opened in firefox and it worked.

    Thanks