1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    23
    Vote Rating
    1
    danrosshoward is on a distinguished road

      0  

    Default Unanswered: TreeStore with XML

    Unanswered: TreeStore with XML


    I am trying to create a nested list, that pulls information from a restful webservice. The format is XML. I think I need to use a treestore, but I am having a hard time finding examples or documentation. Can anyone point me in the right direction.

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,332
    Answers
    124
    Vote Rating
    83
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi!
    below is a sample ,Try this:-

    Code:
    Ext.onReady(function() { 
    Ext.define('Task', {
            extend: 'Ext.data.Model',
            fields: [
                {name: 'task',     type: 'string'},
                {name: 'user',     type: 'string'},
                {name: 'duration', type: 'string'}
            ]
        });
    
        var store = Ext.create('Ext.data.TreeStore', {
            model: 'Task',
            proxy: {
                type: 'ajax',
                url: 'treegrid.xml'
            },
            folderSort: true
        });
    
       var tree = Ext.create('Ext.tree.Panel', {
            title: 'Core Team Projects',
            width: 500,
            height: 300,
            renderTo: Ext.getBody(),
            collapsible: true,
            useArrows: true,
            rootVisible: false,
            store: store,
            multiSelect: true,
            singleExpand: true,
            columns: [{
                xtype: 'treecolumn', //this is so we know which column will show the tree
                text: 'Task',
                flex: 2,
                sortable: true,
                dataIndex: 'task'
            },{
                text: 'Assigned To',
                flex: 1,
                dataIndex: 'user',
                sortable: true
            }]
        });
    });
    Output:-
    gridNorth.png

    Check this for detailed specifications:-
    http://dev.sencha.com/deploy/ext-4.1.../treegrid.html
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    23
    Vote Rating
    1
    danrosshoward is on a distinguished road

      0  

    Default touch?

    touch?


    Sword-it,
    Thanks for you quick response. I may have posted this in the wrong spot. I am using Sencha Touch. I don't see Ext.tree.Panel in the Sencha Touch api. Any other suggestions?

    Dan

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar