Results 1 to 5 of 5

Thread: Ext.ux.grid.TableGrid and Ext.grid.GroupingView

  1. #1
    Ext User
    Join Date
    Feb 2010
    Location
    Berlin, Germany
    Posts
    34

    Question Ext.ux.grid.TableGrid and Ext.grid.GroupingView

    Hi people,

    i want to markup a table into gridpanel via "Ext.ux.grid.TableGrid". the new grid must use a grouping view. but the call of converting throw a exception:
    Code:
    this.grid.store.getGroupState is not a function
    [IMG]chrome://firebug/content/blank.gif[/IMG]        return  this.grid.store.getGroupState();
    with this little code i markup it.
    Code:
    grid = new Ext.ux.grid.TableGrid("grid", {
        stripeRows: true,
        colModel: new Ext.grid.ColumnModel([
            //new Ext.grid.RowNumberer(),
            {header: 'Spalte 1', width: 200, dataIndex:'id', id:'id'},
            {header: 'Spalte 2', width: 200, sortable: true, dataIndex:'wert',id:'wert'},
            {header: 'Spalte 3', width: 200, sortable: true, dataIndex: 'nochwert',id:'nochwert'},
        ]),
        bbar: new Ext.PagingToolbar({
            pageSize: 10,
            store: store,
            displayInfo: true,
            beforePageText: "Seite",
            afterPageText:  " von {0}",
            displayMsg: 'Displaying topics {0} - {1} of {2} ',
            emptyMsg: "No topics to display",
    
        }),
         view: groupgridView,
        store: store,
    
    });
    where is the error?

    p3p3

  2. #2
    Ext User
    Join Date
    Feb 2010
    Location
    Berlin, Germany
    Posts
    34

    Default

    so i think its a bug. after any test i can't convert a html table into gridpanel with a grouping view. the datastore and the columnmodel are set right.

    damn.....

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    The Store needs to be a GroupingStore as you know from the docs.

  4. #4
    Ext User
    Join Date
    Feb 2010
    Location
    Berlin, Germany
    Posts
    34

    Default

    i know, and the store is been set. but is NOT works.

    p3p3

  5. #5

    Default

    p3p3, I also needed a groupingview... Just take a look in tablegrid.js and you'll find it.

    If not , the only thing I changed was:

    Code:
    var ds = new Ext.data.GroupingStore({
            reader: new Ext.data.XmlReader({
                record: 'tbody tr'
            }, fields)
        });
    Code:
    Ext.applyIf(this, {
            'ds': ds,
            'cm': cm,
    		view: new Ext.grid.GroupingView({
                forceFit:true,
                groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
            }),
            'sm': new Ext.grid.RowSelectionModel(),
            autoHeight: true,
            autoWidth: false
        });

Posting Permissions

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