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

[Solved] Hierarchy + Auto Update

2 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 2
Michael asked on 23 Mar 2009, 03:37 PM
I have what seems to be a simple problem and hopefully an equally simple answer:

Currently I have a hierarchical grid, with a details table for drilling down into the data.  The drill down data is where the edit occurs (only update right now).  The problem is that when I update a detail record, the top level record does not want to refresh.

To make this a bit clearer (and trying to avoid bombarding everyone with code, which later we may find is necessary), picture the master record displaying a field "balance".  The detail records are items that total the "balance".  When I update one of the detail balances, it is reflected; however, the master balance field is not.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 26 Mar 2009, 11:29 AM
Hello Michael,

I suggest that you rebind the MasterTableView and see if it works.
                  RadGrid1.MasterTableView.Rebind();

Additionally by default when you rebind a parent table in hierarchical grid the settings/expanded state for the nested tables will be lost. This is because the refresh action resets all previous settings applied for the nested controls to avoid viewstate inconsistencies/unexpected behavior.

You can find more information about how to retain the expanded/selected state for grid items in hierarchy upon a rebind command in the following article.
Retain expanded/selected state in hierarchy on rebind

I hope this helps.

Greetings,
Pavlina
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Michael
Top achievements
Rank 2
answered on 01 Apr 2009, 03:14 PM
Thanks that did the trick.  Odd, because I thought I had tried that.  I put that statement inside the "ItemUpdate" event for the Grid.

I also want to note that the hierarchy retained it's position and values just fine.  I'm using AJAX so I'm guessing that's the intended result of doing so...?
Tags
Grid
Asked by
Michael
Top achievements
Rank 2
Answers by
Pavlina
Telerik team
Michael
Top achievements
Rank 2
Share this question
or