Home  >  Article  >  Web Front-end  >  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
WBOYOriginal
2016-05-16 15:23:201441browse

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.

Statement:
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