Hi,
I create a TreeGrid and have it pre-loaded with initial data using the initialData property. One
of the attributes from the data I supply contains the initial selection state for each item to be rendered
in the tree grid.
Is there any way to have that boolean property used by the framework to have the tree node's initial
selection state reflect that property? I'm looking for something in the lines of
Any such feature? If not, I've struggled trying to have the tree nodes selected using actual
code and wasn't successful using that approach either ... Here's the code I used
My initial data shows up but no selections show up ...
How can this be achieved ?
Thanking you in advance for your help,
I create a TreeGrid and have it pre-loaded with initial data using the initialData property. One
of the attributes from the data I supply contains the initial selection state for each item to be rendered
in the tree grid.
Is there any way to have that boolean property used by the framework to have the tree node's initial
selection state reflect that property? I'm looking for something in the lines of
Code:
TreeGrid.create
({
...
initialData : initialData,
dataProperties : { selectionProperty : 'isSelected' },
...
});
code and wasn't successful using that approach either ... Here's the code I used
Code:
var treeGrid = TreeGrid.create
({
...
initialData : initialData,
...
});
for (var i = 0; i < initialData.length; ++i)
{
if (initialData[i].isSelected)
treeGrid.selectRecord(initialData[i]);
}
treeGrid.markForRedraw();
How can this be achieved ?
Thanking you in advance for your help,
Comment