Home > Article > Web Front-end > How to solve easyui custom label datagrid edit combobox manual input cannot be saved_javascript skills
Use the onEndEdit event (this event can obtain the editor object, but the onAfterEdit event cannot obtain the Editor object)
Get the input data through the editor and save it.
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 the editor's introduction to how to solve the problem of manual input and saving of easyui custom tag datagrid edit combobox. I hope it will be helpful to everyone.