How to solve the problem that the manual input of the easyui custom label datagrid edit combobox cannot be saved,
Use the onEndEdit event (this event can get the editor object, and the onAfterEdit event cannot get the Editor object)
Use the editor to obtain and save the input data.
int ci = 0;for(Column col : columnList ){for(Combobox cbb : col.getCombobox()){if(cbb != null){str += "var ed" + ci + " = $j(\"#"+RandomNumber+"\").datagrid(\"getEditor\",{index:rowIndex,field:\""+col.getField()+"\"});" ;str += "var val" + ci + " = ed" + ci + ".target.combobox('getText');" ;str += "rowData[\"" + col.getField() + "\"] = val" + ci + ";";ci++;}}}
The above content is a small series of instructions on how to solve the problem of manually inputting and saving all the records of the easyui custom tag datagrid edit combobox. I hope this will help you.
Articles you may be interested in:
- Extended easyui. datagrid to add the data loading mask effect code
- Display of ComboBox columns in Extjs EditorGridPanel
- JQuery EasyUI API Chinese Document-DataGrid data table
- ASP. net mvc uses the EasyUI datagrid to submit and save multiple options.
- Cross-origin call implementation code of datagrid in EasyUI in ASP. NET MVC
- PHP-EasyUI DataGrid Data Storage Method
- JQuery easyui datagrid
- Basic use of JQueryEasyUI datagrid framework
- How to clear the DataGrid result set in EasyUI component under Jquery