- Home
- Forum
- React - EJ 2
- use edit in hierarchical grid
use edit in hierarchical grid
Hi guys, I am using the Schedular and grid to show interviews in calendar and list. In Grid I have to show different groups and interviews assigned to these groups in hierarchical grid. I have to give the feature of inline edit in interview. I am getting the data in which I have id's of different data like location and employees. Now I have to show the initial values of location and employee in select lists which shows when someone double clicks on a row. But problem is this if I change the id's to the names of location and employee then I am not getting the id's of the updated location and employee. I am uploading the file please suggest me a better way to manage the crud operation without dataManager and How to get the updated values from a hierarchical edit row. Thanx
Attachment: ListView_47ec548e.zip
Attachment: ListView_47ec548e.zip
SIGN IN To post a reply.
3 Replies
SK
Sujith Kumar Rajkumar
Syncfusion Team
July 9, 2020 12:03 PM UTC
Hi Suman,
Greetings from Syncfusion support.
We are not able to clearly understand your requirement from the provided information. We suspect you need the updated grid data and child grid data(Of a particular row). If so you can get the entire grid and child grid data source using the Grid’s dataSource property(If local data is bound to the Grid). For getting the current view records alone you can use the Grid’s getCurrentViewRecords method to get the updated current view data. This can be achieved for the main Grid and a Child Grid rendered for a particular parent row as demonstrated in the below code snippet,
|
// Main(Parent) grid instance
var gridInst = document.getElementById('Grid').ej2_instances;
// Data source for parent grid
var parentGridData = gridInst.dataSource;
// Current view data for parent grid
var parentGridData = gridInst.getCurrentViewRecords();
// Returns a parent row element based on the index
var selectedParentRow = grid.getRowByIndex(0);
// Returns the parent row’s child grid instance
var childGridInstance = selectedParentRow.nextElementSibling.querySelector('.e-grid').ej2_instances[0];
// Data source for the entire child grid
var childGridData = childGridInstance.dataSource;
// Current view data for the particular child grid
var childGridData = childGridInstance.getCurrentViewRecords(); |
Note: From the code file you had provided we could see that you have not defined a primary key column field for the Parent and Child Grid. Editing feature requires a primary key column for the CRUD operations. To define primary key, set
columns.isPrimaryKey to true in particular column. More details on this can be checked in the below help documentation link, If we misunderstood your requirement can you please elaborate on it, if possible with a pictorial representation so that we can check and provide the proper solution for it.
Regards,
Sujith R
SK
Suman Kumar
July 14, 2020 11:49 AM UTC
SK
Sujith Kumar Rajkumar
Syncfusion Team
July 15, 2020 11:59 AM UTC
Hi Suman,
We have created a new incident under your Direct trac account to follow up with this query. We suggest you to follow up with the incident for further updates. Please log in using the below link.
Regards,
Sujith R
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
SK Suman Kumar
- Jul 8, 2020 02:12 PM UTC
- Jul 15, 2020 11:59 AM UTC