Hi Dirk,
Thanks for using Syncfusion Products.
We are glad to let you know that we have created a sample based on your requirement and the same can be downloaded from below link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/118052/Sample-959640018-301822669.zip
In the above sample, using “RecordDoubleClick” Grid event we have shown a dialog to display the values of current record and on “click” event of save button in dialog we have used ajax post to update database and then in its success event we have updated Grid using “updateRecord” Grid method. Please refer the following code snippets.
<ej:Grid ID="Grid" runat="server" AllowPaging="true" Width="1500px"> ... <ClientSideEvents RecordDoubleClick="EditHandler" />
</ej:Grid>
<ej:Dialog ID="basicDialog" Width="550" runat="server" Title="Edit Record" ShowOnInit="false">
<DialogContent>
<div id="EditTable"></div>
</DialogContent>
</ej:Dialog>
function EditHandler(args) {
...
$("#EditTable").html(editData)
$("#basicDialog").ejDialog("open")
}
function saveHandler() {
...
$.ajax({
url: "Default.aspx/Update",
data: JSON.stringify({ value: data }),
...
type:"POST",
success: function (e) {
var obj = $("#Grid").ejGrid("instance");
obj.updateRecord("OrderID",e.d);
$("#basicDialog").ejDialog("close")
}
})
} |
Alternatively, instead of manually opening dialog on record double click we can use “Dialog Editing” feature of Grid to use dialog for Editing and “RemoteSaveAdaptor” of Grid DataManager which has server-side interaction during CRUD operation in Grid.
Please refer the following online sample link for Dialog Editing in Grid and UG Documnetaion for “RemoteSaveAdaptor” of Grid DataManager.
Online Sample: http://mvc.syncfusion.com/demos/web/grid/dialogediting
RemoteSaveAdaptor Documentation: http://help.syncfusion.com/ug/js/documents/crudoperationwithser.htm
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S