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

[Solved] HowTo Save and reload the Last Expanded Structue of a hierachical RadGrid

1 Answer 108 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Fabian
Top achievements
Rank 1
Fabian asked on 31 Jul 2009, 02:34 PM

Hello Support and Telerik Team,

I need to solve the following Grid behavior.

I  use a hierachical RadGrid to display a Overview in a GRid  with 4 Layers. On selecting a Item I redirect to the related Detail Page, If i go back from there, I need to restore the last Grid View

The Rad Grid is bound with 4 SQLDatasoures, one for each Grid / Subgrid Layer

I need to save an restore
> selected Page
> PageSize
> Last Search
> Last Hierachical Structure  ( all expanded Items in the last View )

The First ponits are solved, but I find no good way to solve the  last Point with accepable Performance.

I need to save each expaned Item of the Grid, and when the User come backs to page, I need to restore the last View.

I tryed to use the Itemcommand Event to save the Expaned Items with HierachicaltemIndex.
I tryed to use the radGrid_Prerender Event to restore the view.

1. Problem
> The First Expand Layer Action fires no Postback, because the Data seems to be Precached in the Grid on First Load
> The Sec Expand Layer fires a Postback, but I wonder how to find the Partent Hierachicalindex

In the Prerender i walk through all Hierachical Items, and If the Hierachical Index is in  my Saved List, I set Expanded = true.
Because the first layer makes no Postback, It is never in the  List and I can't expand it, If I expand a Child, the Partent is not expaned automatically.

One Point which makes the behavior mre difficult is, that the Overview and the Detail is in one aspx  Page with a Muliview Control in a Updatepanel. Switching between Master and detail makes only a simpel Postback, no complete Reload of the hole page-

Is there a known best Practise to solve my behavior?



Kind Regards


  










1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 05 Aug 2009, 03:37 PM
Hello Fabian ,

Please, review the following code library example that should give you directions on how to implement the last requirement of your scenario (here).

Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Fabian
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or