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

Refresh grid from Insert and update event of a tableview

3 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David Sánchez
Top achievements
Rank 1
David Sánchez asked on 19 Jan 2009, 08:14 PM
Hi,
when i update or insert a new item in a Detailtableview i need to refresh the parent item, but if i use a RadGrid.Rebind() the detailview is not closed (althought make the insert or the update) and don't refresh the grid. What i do wrong?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Jan 2009, 06:15 AM
Hi David,

Normally when you rebind a  hierarchical grid the settings/expanded state for the nested tables will be lost. I am not sure whether this is the problem you face. If so you can refer the following code library which explains how to retain the state for grid items in hierarchy upon a rebind command.
Retain expanded/selected state in hierarchy on rebind Feed from this thread Subscribe for this thread

Thanks,
Shinu.
0
David Sánchez
Top achievements
Rank 1
answered on 20 Jan 2009, 08:33 AM
No, the problem is other, i 'll try to explain better:

how can i refresh the parent item of a nestedtable item 
from the UpdateItem o InsertIntem event ?
the problem is that i update some fields in the database whose are bounded with the parent item of the nested table item.

thank you
0
Sebastian
Telerik team
answered on 22 Jan 2009, 04:22 PM
Hi David,

The idea from the code library example pointed by Shinu is to refresh the main grid when you would like to process some changes at each level of the hierarchy and keep the expanded state of the items at the same time. This should be sufficient in your case as well to reflect the changes in the parent table while processing some changes in the nested table.

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
David Sánchez
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
David Sánchez
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or