Extjs editorgridpanel Function

Source: Internet
Author: User

<1> function: modify one column and then automatically modify another column.

Directly use the Afteredit event. After a cell is edited, The Afteredit event is triggered. You can use this event processing function to edit the cell information.

VaR gridpanel = new Ext. grid. editorgridpanel ({ID: "ID", store: mystore, height: 350, clickstoedit: 1, CM: columnmodel, SM: selectionmodel, viewconfig: {forcefit: True, enablerowbody: false, showpreview: false}, listeners: {Afteredit: function (VAL) {// The sequence Ext. UX. toast. MSG ("prompt message", "column number:" + val. column + "row number:" + val. row); Ext. UX. toast. MSG ("prompt message", "field name:" + val. field + "Original Value:" + val. originalvalue + "Current Value:" + val. value); // use the set method to modify the value, and use the get method to obtain the value. // The following function is quantityleft auto-minus 1val. record. set ("quantityleft", Val. record. get ("quantityleft")-(Val. value-Val. originalvalue ));}}});

:

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.