Hello Iso,
I have encountered a slight complication with getGroupTree() method on a grouped listGrid.
What I'm trying to accomplish is to save a state of opened folders (groups) of a grouped listgrid to reapply this state later on. I have found getOpenState() method in ResultTree class which seems to be exactly what I want.
The issue I'm encountering is that my listGrid returs a Tree, not a ResultTree when getGroupTree() is called.
In the docs it states that a ResultTree is returned if a DataSource is provided to the ListGrid . I do have a DataSource bound to a listGrid. The datasource is a clientOnly DS with defined dataSourceFields but it receives no data. Data are provided to the grid via ListGrid.setData().
Is this why listGrid.getGroupTree() returns a Tree instead of a ResultTree?
Even if I provide the data to the DS (either as DS.setTestData() or DS.addData()) a simple Tree is returned.
Is there any way I can get ahold of a resultTree within this configuration?
Thanks
SmartGWT: SmartClient Version: v11.1p_2018-03-21/Pro Deployment (built 2018-03-21)
Chrome: 67.0.3396.99
EDIT: I'v just noticed that I'v probably posted this in the wrong forum section. Feel free to move this thread to SmartGWT Q&A if needed.
I have encountered a slight complication with getGroupTree() method on a grouped listGrid.
What I'm trying to accomplish is to save a state of opened folders (groups) of a grouped listgrid to reapply this state later on. I have found getOpenState() method in ResultTree class which seems to be exactly what I want.
The issue I'm encountering is that my listGrid returs a Tree, not a ResultTree when getGroupTree() is called.
In the docs it states that a ResultTree is returned if a DataSource is provided to the ListGrid . I do have a DataSource bound to a listGrid. The datasource is a clientOnly DS with defined dataSourceFields but it receives no data. Data are provided to the grid via ListGrid.setData().
Is this why listGrid.getGroupTree() returns a Tree instead of a ResultTree?
Even if I provide the data to the DS (either as DS.setTestData() or DS.addData()) a simple Tree is returned.
Is there any way I can get ahold of a resultTree within this configuration?
Thanks
SmartGWT: SmartClient Version: v11.1p_2018-03-21/Pro Deployment (built 2018-03-21)
Chrome: 67.0.3396.99
EDIT: I'v just noticed that I'v probably posted this in the wrong forum section. Feel free to move this thread to SmartGWT Q&A if needed.
Comment