We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Master and Details edit inline

Thread ID:





127955 Dec 21,2016 12:28 PM UTC Dec 30,2016 04:34 AM UTC ASP.NET MVC 3
Tags: Grid
Asked On December 21, 2016 12:28 PM UTC


I've a Master and Details grids, but I need edit inline de Details grid. But when I add a new element, I don't have the ID of Master in Insert Action


Ragavee U S [Syncfusion]
Replied On December 22, 2016 12:54 PM UTC

Hi Manolo, 

Thanks for contacting Syncfusion support. 

As we have rendered the detail grid based on the row data of the selected row. So, we can get the relational value and set it when adding a new record to the detail grid using the actionBegin event of the Grid. 

Please refer to the below code example. 

rowSelected: function (args) {//rowSelected event of master grid 
    employeeID = args.data.EmployeeID;//get the primary key value of master grid 
    var detaildata = ej.DataManager(window.gridData).executeLocal(ej.Query().where("EmployeeID", ej.FilterOperators.equal, employeeID, false).take(10)); 
    var gridObj = $("#DetailGrid").ejGrid("instance"); 
    gridObj.dataSource(ej.DataManager(detaildata.slice(0, 5))); 
//actionBegin event of detail grid 
actionBegin: function (args) { 
    if (args.requestType == "save") { 
    else if (args.requestType == "add") { 
        args.data["EmployeeID"] = employeeID;//assign the column value with the primary key value of master grid 

Ragavee U S. 

Replied On December 28, 2016 07:11 PM UTC

Perfect! Thanks a lot!

Ragavee U S [Syncfusion]
Replied On December 30, 2016 04:34 AM UTC

Hi Manolo, 
Thanks for your update. 
We are happy that your requirement is achieved. 
Ragavee U S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon