This is a migrated thread and some comments may be shown as answers.

Hide Expand/Collapse image

1 Answer 119 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Angie
Top achievements
Rank 1
Angie asked on 02 Jul 2008, 04:57 PM
I've asked this question before and never got a satisfactory answer. 

None of the "official" examples for iterating through the detail tables to hide the expand/collapse image mention that the grid MUST BE expanded in order for this to work.  And doesn't that kind of defeat the purpose of having expand on demand?

I would like to have an example of how to re-collapse the grid once the expand/collapse images have been hidden. 

And also how to KEEP the expanded state of what the users are looking at on postback, for example, on editing a specific detail row.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 03 Jul 2008, 01:08 PM
Hi Angie,

If you need to collapse an item when the collapse image is hidden, you will need to do it in the code behind by setting the Expanded property of the item. Other than that, please find attached a sample project I have created to demonstrate persisting of the item expanded state throughout postbacks and events. When an item is expanded/collapsed, its state is preserved in the session object and then restored before each rendering of RadGrid. This ensures persistent behavior even during updates and inserts.

Greetings,
Veli
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Angie
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or