Hi Jorge,
We can add a new row as child, by setting “RowPosition” enumeration value as “Child”.
Code Snippet:
<script type="text/javascript"> function addNewRow() { var treeObject = $("#Treegrid").data("ejTreeGrid"); var newRecord = { Id: 10, Name: "childTask", StartDate: "02/23/2014", EndDate: "02/27/2014" } treeObject.addRow(newRecord, ej.TreeGrid.RowPosition.Child); } |
We have prepared a sample based on your requirement, find the sample from below location.
Sample: http://www.syncfusion.com/downloads/support/forum/121139/ze/Add_child_Row407766024
Please let us know, If you need further assistance on this.
Regards,
Dinesh kumar.N
Hi Jorge,
If data type of the primary key column (IdRow) is GUID, then the id of newly added record has also to be a GUID data type. We have prepared a sample based on your requirement, Find the sample from below location.
Sample: http://www.syncfusion.com/downloads/support/forum/121139/ze/TreeGridSample_with_GUID-1479806403
Please let us know, if you need further assistance on this.
Regards,
Dinesh kumar.N
Hi Jorge,
Do you want to generate GUID for IDRow automatically when we add a new row using toolbar?. For clarification, please find the below screenshot,
Screenshot: http://www.syncfusion.com/downloads/support/forum/121139/ze/Screenshot-438427437
Please let us know, if you need further assistance on this.
Regards,
Dinesh kumar.N
Hi Jorge,
We regret for the inconvenience caused.
We were able to reproduce the issue while adding new row using public method with GUID data type and we have confirmed this as bug and logged a report on this. Also we have created a support incident under your
account to track the status of this issue.
Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let us know if you require further assistance on this.
Regards,
Dinesh kumar.N