BoldDeskBoldDesk is now live on Product Hunt with a special offer: 50% off all plans. Let's grow together! Support us.
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}); |