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

How to update master cell after saving details

1 Answer 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 11 Dec 2018, 03:22 PM

Hi,

I am using a hierarchical (master/detail) grid.  After I click to save changes to the detail grid, I would like to update the contents of a particular cell in the master.  This displays summary data from the details grid.  So, after the detail changes have been saved I need to make a server call to grab some data from the database and display it in that cell.  How would I make this call, return the data and display it in my chosen cell in the parent?  I appreciate that I could refresh the entire grid (or page) but would prefer to make an Ajax style update to make the process quicker and slicker.

Many thanks,

Colin

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 13 Dec 2018, 02:20 PM
Hi Colin,

You could handle the "requestEnd" event of the child Grid and if the type is different than "read", you could make a manual AJAX request to get the data that you need:
Within the success method of the AJAX request you could then find the TR element of the parent dataItem with jQuery, find the cell that you need to update and change its content. If the parent Grid is using "Batch(InCell)" edit mode, you could also use the "set" method of the dataItem. You could get reference to a dataItem using the "dataItem" method of the Grid and the corresponding TR element:
Hope this helps.


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
n/a
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or