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

Issues with RadGrid hierarchy expand/collapse

2 Answers 290 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 18 Sep 2008, 01:27 AM
Hi,

I am seeing some odd behavior with radgrid. I have two grids on the page. I had RadGrid1 set to HierarchyLoadMode="Client". The other was loading on demand. Both grids were updated in the code behind via AJAX without rebinding. Sometimes an update would cause one or more expanded rows on RadGrid1 to collapse. At other times this did not happen (using the same update with the same data). I removed the HierarchyLoadMode to go back to load on demand. Now I am finding that the first time I click on a + to expand a row the LoadingPanel displays briefly but the row does not expand. It does not call NeedDataSource or DetailTableDataBind. All subsequent clicks expand the rows as intended.

Can anyone shed light on these behaviors please.

Thanks in advance.
Steve

2 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 18 Sep 2008, 01:38 PM
Hello Stephen,

Could you, please check if the behavior is caused by AJAX. Please try removing any ajax controls from the page see if the behavior persists. If it turns out that this is a RadAjax issue, please share with us some sample code on how you ajaxify your controls on the page.

Sincerely yours,
Veli
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Stephen
Top achievements
Rank 1
answered on 24 Sep 2008, 04:27 AM

Hi,

I found one of the issues. I had been experimenting with changing the ID of individual cells in the ItemDataBound and ItemCreated event handlers. That was causing the grid hierarchy expand to fail on the first try. The RadGrid refreshed the cell ids and then it worked from that point on. Having removed the ID changing code the grid works fine.

I still do not know what was causing the grid to collapse in a non-constant fashion on Ajax updates. To my mind it should have retained its expansion state as it does when using standard server HierarchyLoadMode instead of client load mode. Sometimes it did just that but more often one or more of the expanded sections would collapse when the Ajax update happened.

Thanks
Steve

Tags
Grid
Asked by
Stephen
Top achievements
Rank 1
Answers by
Veli
Telerik team
Stephen
Top achievements
Rank 1
Share this question
or