Home > Web Front-end > JS Tutorial > How to solve easyui custom label datagrid edit combobox manual input cannot be saved_javascript skills

How to solve easyui custom label datagrid edit combobox manual input cannot be saved_javascript skills

WBOY
Release: 2016-05-16 15:23:20
Original
1489 people have browsed it

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++;
}
}
}
Copy after login

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.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template