Reference example: CRUD: Row edit 1: Create a cell Editor & lt; divid & quot; datagrid1 & quot; class & quot; mini-datagrid & quot; style & quot; width: 700px; height: 280px; & quot; url & quot ;.. /data/DataService. aspx?
Example: CRUD: Row editing
1. Create a cell Editor
Url = "../data/DataService. aspx? Method = SearchEmployees ">
#
Employee account
Gender
Age
Date of birth
Creation date
For example, the property of mini-textbox is "editor", which indicates the editor of this column.
Ii. editing operations
Start to edit the row:
Grid. beginEditRow (row );
Cancel Editing:
Grid. cancelEdit ();
Submit and edit data:
Var rowData = grid. getEditRowData (row );
Grid. loading ("saving ......");
Var json = mini. encode ([rowData]);
$. Ajax ({
Url: "../data/DataService. aspx? Method = SaveEmployees ",
Data: {employees: json },
Success: function (text ){
Grid. reload ();
},
Error: function (jqXHR, textStatus, errorThrown ){
Alert (jqXHR. responseText );
}
});