1. #1
    Ext User
    Join Date
    Apr 2009
    Location
    Dallas
    Posts
    22
    Vote Rating
    0
    Brahose is on a distinguished road

      0  

    Default store not loading

    store not loading


    Hello all, I have a data.Store which I am using to populate an EditorGrid. I have done this before, but for some reason this will not work! My grid hangs during the loadMasking, and will not even call the url I specified (I have a breakpoint at the entry).

    Code:
    initWindow: function(){
            this.store = new Ext.data.Store({
                url: 'adminHandler.ashx', //this call to adminHandler will grab all the records
                reader: new Ext.data.JsonReader({
                    root: 'cols',
                    fields: 
                        [//{{header: '{0}', width: {1}, sortable: {2}, dataIndex:'{3}', hidden: {4}, groupable: {5}, enabled: {6}, order: {7}, gt: '', lt: '', eq: ''
                           {name: 'dataIndex'},
                           {name: 'header'},
                           {name: 'width'},
                           {name: 'sortable'},
                           {name: 'groupable'},
                           {name: 'hidden'},
                           {name: 'gt'},
                           {name: 'lt'},
                           {name: 'eq'},
                           {name: 'order'},
                           {name: 'enabled'}
                        ]
                })
            });
            this.details = new Ext.Panel({
                margins: '2 2 2 2',
                width: 200,
                collapsible: true,
                split: true,
                region: 'east',
                title: 'Column Properties',
                items: new Ext.grid.PropertyGrid({
                    autoHeight: true,
                    autoExpandColumn: true,
                    width:'auto',
                    source: {
                        '(name)': '',
                        'header': '',
                        'width': 80,
                        'hidden': false,
                        'Groupable': true,
                        'Sortable': true,
                        'gt': '',
                        'lt': '',
                        'eq': ''
                    }
                })
            });
            this.columns = new Ext.Panel({
                margins: '3 3 3 3',
                labelWidth: 120,
                width: 375,
                border:false,
                split: true,
                layout: 'fit',
                region: 'center',
                items: new Ext.grid.EditorGridPanel({
                    store: this.store,
                    autoLoad: true,
                    loadMask: true,
                    defaultSortable: false,
                    cm: new Ext.grid.ColumnModel(
                    [{
                        id:'columnName',
                        header:'Column Name',
                        width: 150,
                        dataIndex: 'name'
                    },{
                        id:'header',
                        header:'Column Header',
                        width: 150,
                        dataIndex: 'header'
                    },
                    checkColumn
                    ]),
                    plugins:checkColumn,
                    title: 'Available Columns'                 
                })
            });
            this.users = new Ext.Panel({
                title: 'Your users',
                collapsible: true,
                split: true,
                region: 'west',
                margins: '1 1 3 3',
                width: 200
            });
        }
    Please let me know if you see anything that may be causing the store's load not to execute.

    Thanks,
    Brian

    P.S. I just started using ExtJs this month, and absolutely love it! Great work!!

    EDIT: oops, this is a 2.2 question, please move to 2.x help if you would like.
    Last edited by Brahose; 14 May 2009 at 8:46 AM. Reason: wrong thread

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,049
    Vote Rating
    657
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    You're setting autoLoad on the grid, you should be setting that property on the store.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User
    Join Date
    Apr 2009
    Location
    Dallas
    Posts
    22
    Vote Rating
    0
    Brahose is on a distinguished road

      0  

    Default


    Thanks for the catch, I am still learning the details of the API.

    The grid has stopped 'hanging' when the window opens, but it still doesn't even call my URL.

    Thanks,
    Brian

  4. #4
    Ext User
    Join Date
    Apr 2009
    Location
    Dallas
    Posts
    22
    Vote Rating
    0
    Brahose is on a distinguished road

      0  

    Lightbulb dumb

    dumb


    I was able to solve the issue. I was getting a 404 after I moved this js file in a sub folder and wasn't updating location in the url.

    I feel really dumb...

Thread Participants: 1