Hi all, I'm trying to have an AdvancedDataGrid using a GroupingCollection that has a certain number of rows that get grouped by a column called "GROUP_NAME". I set a Timer() and call a refresh on the XML every 5 seconds or so (it's provided by WebORB through AMF). I want to remember which rows were closed and which were open BEFORE the refresh and i want to keep them closed/open AFTER the refresh.
What I've done is: - created an onClick event for the AdvancedDataGrid - made it do this: var item:Object = AdvancedDataGrid(event.currentTarget).selectedItem; // this is so that the user can click the whole row if (adg.getParentItem(item) == null) { adg.expandItem(item, ! adg.isItemOpen(item), true); } closedItems.addItem(item); // closedItems is an array of "closed" rows, let's not worry about their current state and so on, I just want to close any row that's in this array Then I have an onResult handler for the XML which, when the XML is read from the WebORB object, runs the following block of code: if (closedItems.length > 0) { //Alert.show('some items should be closed'); //Alert.show(adg[1].toString()); for each (var oneRow:Object in closedItems) { adg.expandItem(oneRow, false); Alert.show(adg.isItemOpen(oneRow).toString()); } } Now, the above Alert.show() returns, CORRECTLY, 'false', i.e. that the item is CLOSED. However, the actual item in the datagrid is still folded open!! My GroupingCollection is defined like this: <mx:GroupingCollection id="groupedData" source="{agentData}" childrenField="xx" > (etc) I refresh by re-assigning agentData to the WebORB result and calling groupedData.refresh(). What am I doing wrong? Anybody have any suggestions? Cheers, -q