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.
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 07:28 AM Dec 29,2016 11:34 PM ASP.NET MVC 3
Tags: Grid
Asked On December 21, 2016 07:28 AM


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 07:54 AM

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 02:11 PM

Perfect! Thanks a lot!

Ragavee U S [Syncfusion]
Replied On December 29, 2016 11:34 PM

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.

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