How to solve the problem that the manual input of the easyui custom label datagrid edit combobox cannot be saved,

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.