Home > Web Front-end > JS Tutorial > body text

如何解决easyui自定义标签 datagrid edit combobox 手动输入保存不上_javascript技巧

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

使用onEndEdit事件(该事件可以获取到editor对象,onAfterEdit事件获取不到Editor对象)
通过editor拿到输入数据并保存。

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

以上内容是小编给大家介绍的如何解决easyui自定义标签 datagrid edit combobox 手动输入保存不上的全部叙述,希望对大家有所帮助。

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!