Hi,
I'm having issues with the getSelection() method on TreeGrid components which are marked
with visibility == 'hidden'. I use the 'selectionProperty' along with the 'initialData' to feed the TreeGrid.
The getSelection() returns an empty collection unless the TreeGrid gets rendered at least once.
Here's the code I use:
Is there anything I can do to have the getSelection() return selections prior to having the tree rendered first?
Thanks,
I'm having issues with the getSelection() method on TreeGrid components which are marked
with visibility == 'hidden'. I use the 'selectionProperty' along with the 'initialData' to feed the TreeGrid.
The getSelection() returns an empty collection unless the TreeGrid gets rendered at least once.
Here's the code I use:
Code:
var treeGrid = MeiTreeGrid.create ({ dataSource : this.treeDataSource, dataProperties : { openProperty: 'isOpen' }, isFolderProperty : 'isFolder', selectionProperty : 'isSelected', nodeIcon : this.dimIcons.find('name', dimName).icon, folderIcon : this.dimIcons.find('name', dimName).icon, selectionAppearance : 'checkbox', leaveScrollbarGap : false, layoutMargin : 0, width : '100%', height : '100%', layoutMargin : 0, membersMargin : 0, visibility : 'hidden', initialData : initRecords, fields : [ { name : 'caption', treeField : true } ] }); // returns an empty collection unless TreeGrid has rendered at least once var selections = treeGrid.getSelection();
Thanks,
Comment