Our blazing fast Grid component built with pure JavaScript


Post by gregc »

Very relieved to see the tree grid is very similar in use to the regular grid.
I'm not able to trigger it to call the AJAX store though?

If you go to here:

https://www.bryntum.com/examples/grid/tree/

and replace the code with

import { TreeGrid, GridRowModel } from '../../build/grid.module.js?447702';

 let tree = new TreeGrid({
   appendTo : 'container', 
   autoHeight : true,
   autoLoad: true,
   features : {
        cellMenu : {
            items : {
                removeRow : false
            }
        }
   },
   store : { 
        readUrl : 'something.json'    
}, columns : [ { field : 'f0', type : 'tree', text : 'Display', flex : 1 }, { field : 'f1', text : 'Type', flex : 1 }, { field : 'f2', text : 'Description', flex : 1 } ] });

I would expect to watch the chrome network tab and see a call to the URL something.json but it doesn't do anything. Am I missing something obvious? Loading up the data manually into the definition works of course.

Last edited by gregc on Thu Feb 04, 2021 4:01 pm, edited 2 times in total.

Post by mats »

You put autoLoad on the Tree as opposed to the Store, that's why.

store : {
        modelClass : Gate,
        readUrl    : 'data/kastrup-airport.json',
        autoLoad   : true
    },

Post Reply