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

Reload (refresh) a child in hierarchical grid

2 Answers 321 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alexei
Top achievements
Rank 1
Alexei asked on 31 Mar 2009, 09:02 PM
Hello,

I have the following issue. I have a radgrid (for ASP.NET AJAX) which has many detail tables - a whole multilevel hierarchy. I go and ad a new entry to one of the detail tables - the adding is taking place in a RadWindow which calls my "ADD" page. When the radwindow closes I need to refresh that detail table which I just updated.

But I need the whole hierarchy to stay open.

 I tried envoking __doPostback on the update panel within which the RadGrid is placed, but it seems that each detail table has its own dynamically added update panel and thus I can't postback it at will. Or can I?

For I found the way to call rebind() on the table in question, only it doesn't reflect on the page for it's not refreshed...

Is there a solution for my problem. Even if it takes to reload the grid or the whole page - i don't care as long as I can track back to the table I was starting with and have it open with the newly added value...

Thanks a lot!

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 Apr 2009, 03:58 AM
Hi Alexei,

Try rebinding the Detail table once the new entry is added to the detail table. Refer the following code library submission which explains how to retain the expanded/selected state in hierarchy on rebind.
Retain expanded/selected state in hierarchy on rebind

Shinu

0
Alexei
Top achievements
Rank 1
answered on 02 Apr 2009, 12:16 PM
As I said, the record is added outside of the page - in a popup, thus rebinding the table isn't an easy task. However I found a solution. I tried __doPostBack passed through JavaScript from the child window to the parent on the dynamically added update panel, which holds my detail table, but unsuccessffully. Then I added a hidden command button to the child table which calls "Refresh" command, which in turn envokes the e.item.owner....Rebind(). The __doPostBack is then envoked on that very button and everything goes smoothly. Obviously, the UniqueId of my button needs to be passed to the client somewhere, but this is details - the concept that's what matters.

Thanks for your input!
Alexe Fimine
Tags
Grid
Asked by
Alexei
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Alexei
Top achievements
Rank 1
Share this question
or