Expand exclusive in Hierarial Grid

Hi I need to expand exclusivly an hierarial grid: When I expand a row I want all the others to be closed. ( In my configuration the clicked row is selected ) I tryed to collapse all rows in Expanding event - this made an expand in a wrong row. I tried to collapse the previous expanded row In Expanded event, this made the selected row point to the place that the Expanded row was before the collapse ( there is a call to moveTo somewhere in the mouse up handling ) Is there a way to achive the behaviour I need ?

3 Replies

AD Administrator Syncfusion Team September 4, 2003 02:16 PM UTC

I do not know of a good way to do this. Attached is a try at it, but it uses a timer to position the current cell in one case where it was being reset the way you described.


AS Asaf Segal September 9, 2003 01:00 AM UTC

Thanks for the sample. Is there a way to avoid the flickering when selectibg the row with the timer event ?


AD Administrator Syncfusion Team September 9, 2003 06:42 AM UTC

I think most of the flickering is being caused by the currentcell being positioned and then moved. There is a DrawCurrentCellFrame event that you can use to avoid drawing the current cell frame. So, if you set a flag when you do not want it drawn, and then cancel this event based on this flag, then you might be able to avoid some of the flicker. But I am not sure you will be able to remove all flickering without a lot of tickering to handle things perfectly. Attached is a rough try at doing this.

Loader.
Up arrow icon