1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    54
    Vote Rating
    0
    raju0574 is on a distinguished road

      0  

    Default Unanswered: How to reload the nestedlist...?

    Unanswered: How to reload the nestedlist...?


    Initially i have a nested list with some value
    Eg: TreeStore= new Ext.data.TreeStore({ model: 'treestore',
    root:{text: 'Groceries',items: [{text: 'Drinks',items: [{text: 'Water',items: [{text: 'Sparkling',leaf: true},{text: 'Still',leaf: true}]
    },{text: 'Coffee',leaf: true},{text: 'Espresso',leaf: true},{text: 'Redbull',leaf: true
    },{text: 'Coke',leaf: true},{text: 'Diet Coke',leaf: true}]},{text: 'Empty Category',
    items: []}]};,

    storeId:'root',
    autoLoad:true,
    autoSave:true,
    proxy: { type: 'memory', reader: { type: 'tree', root: 'items' } },
    }
    });

    .. i have the changed the values in nested list with extra values added to root...
    Change the values in nested list like this
    TreeStore.root = {text: 'Groceries',items: [{text: 'Drinks',items: [{text: 'Water',items: [{text: 'Sparkling',leaf: true},{
    text: 'Still',leaf: true}]},{text: 'Coffee',leaf: true
    },{text: 'Espresso',leaf: true},{text: 'Redbull',leaf: true
    },{text: 'Coke',leaf: true},{text: 'Diet Coke',leaf: true}]
    },{text: 'Empty Category',items: []}]};

    Is it correct way do for changing the values in tree store?
    but t s not reflecting in UI... Hw can i get the changed values in UI (nested list)
    i ve tried with doLayout() for the nestedlist is not working...

    My Nested List is Here:

    NestedList = new Ext.NestedList({
    flex:1,
    cls:'nestedlist',
    title:'Lists',
    width:'10%',
    height:'100%',
    id:'nestedlist',
    cardSwitchAnimation: 'fade',
    backText: "Back",
    useTitleAsBackText: false,
    toolbar: {
    cls:'nestedlisttoolbar',
    items: [
    {xtype: 'spacer'}]
    },
    store: TreeStore,
    getDetailCard: function(recordNode, parentNode) {
    console.log(recordNode);
    console.log(parentNode);
    return new Ext.Panel({
    title: 'Details about ' + recordNode.text,
    html: recordNode.text + ' is great'
    });
    }


    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,624
    Vote Rating
    434
    Answers
    3105
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Each item of NestedList is a list and each list has it's own store. So if the list is already shown it's store is then disconnected to the TreeStore.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

Tags for this Thread