dhtmlxGrid: Expand Group if selected=1

I have a grid that loads data from XML. I included a selected attribute if the row is to be selected by default when the grid loads.

XML Copy: <rows> <row id="1" > <cell>Group 1</cell><cell>10000</cell><cell>11110</cell><cell>Building 11110</cell> </row> <row id="2" selected="1"> <cell>Group 1</cell><cell>11000</cell><cell>11240</cell><cell>Building 11240</cell> </row> <row id="3"> <cell>Group 2</cell><cell>12000</cell><cell>12110</cell><cell>Building 12110</cell> </row> <row id="4"> <cell>Group 2</cell><cell>12000</cell><cell>12111</cell><cell>Building 12111</cell> </row>

Right now the grid groups by column 0 (Group 1/2 in the xml above), loads with Row 2 selected, and every group expanded. I would like any group that does not contain a row with an attribute selected=1 to be collapsed. Is there an API I could call that looks for selected state in the group?

Thanks.

Kevin

Any thoughts?

In case of using the multiselect mode you may getSelectedRow() method:
docs.dhtmlx.com/doku.php?id=dhtm … ectedrowid