Results 1 to 4 of 4

Thread: switching between grouping store and store

  1. #1
    Sencha User
    Join Date
    Dec 2009
    Posts
    425

    Question switching between grouping store and store

    Hi,
    My grid is configured with a grouping store.
    I need to change my grid's store to a normal store on the click of a button and back to grouping store on another click.
    Is it possible?

    The grid has ......

    view: new Ext.grid.GroupingView({

    groupTextTpl:
    '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
    })

    but this will be needed only for a grouping store.

    Please help.

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    yes, reconfigure the grid with a new view and model (store)

  3. #3
    Sencha User
    Join Date
    Dec 2009
    Posts
    425

    Question

    Thank you, jgarcia.
    It works properly when i switch from Store to GroupingStore but when i go the other way, an error comes up.
    My grid is configured with a GroupingStore and GroupingView as ....

    view: new Ext.grid.GroupingView({
    getRowClass :
    function (record, index) {
    if(record.data.inbound)
    return'';
    else
    return'redRow';
    },
    groupTextTpl:
    '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "records" : "record"]})'
    })

    It is due to this that when i switch to Store, an error comes but i need this for the GroupingStore.

    Can I put this config dynamically instead of putting in in the grid?
    Please help

  4. #4
    Sencha User
    Join Date
    Dec 2009
    Posts
    425

    Default

    Can anyone please help with this....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •