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

How to catch key value from MVC Grid Edit PopUp model and put it to another grid DataSource Read method?

1 Answer 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yuriy
Top achievements
Rank 1
Yuriy asked on 15 Dec 2015, 02:39 PM

Hello.

 

I have MVC grid binding to some model. When I click on Edit button, it is open an edit window with some controls. One of them is  grid. Is it possible to put key property from fitst model to DataSource Read method of second grid (I need to load in popup window data with the same property value as in first grid)?

 

Thanks. 

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 17 Dec 2015, 10:08 AM

Hello Yuriy,

 

My suggestion is to use the transport.read.data for the dataSource of the nested grid and define a function that is fired when read request is going to be sent. 

 

In the edit event you can find the grid and its dataSource and call its read method and send the key value as additional parameter. Since the data function will be fired before the edit event autoBind option should be set to false. 

 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Yuriy
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or