Hi David,
Thanks for using Syncfusion products.
Query 1: what are the methods used in the grid because i need to make a customized buttons like add, remove and edit the line Please refer the below link for performing add, remove and edit the record externally.
For adding the row:
https://help.syncfusion.com/api/js/ejgrid#methods:addrecord For delete the record:
https://help.syncfusion.com/api/js/ejgrid#methods:deleterecord For Edit the record:
https://help.syncfusion.com/api/js/ejgrid#methods:startedit For saving the record:
https://help.syncfusion.com/api/js/ejgrid#methods:endedit Query 2: What can i do to save row when i do a addRecord() method ? We can add the record in two ways externally by using addRecord method. 1. We can add the empty record and then add the corresponding fields then we can save the added/edited record using “endEdit” method of the grid as follows.
//Getting instance of the grid var gridObj = $("#Grid").data("ejGrid"); //Add the below code to the click event of the external button “Adicionar” for add the record gridObj.addRecord(); //Add the below code to the click event of the external button “Guardar” for sending save request gridObj.endEdit();
|
2. We can add the record by passing the record to the addRecord method itself as follows.
var gridObj = $("#Grid").data("ejGrid");
//Use the below code for add and save the record automatically without calling the method “endEdit” . gridObj.addRecord({OrderID:12333});
|
While using above code snippet, there is no need to send the save request using “
endEdit” method. The added record will automatically get saved.
Please let us know if you have any queries.
Regards,
Gowthami V.