ExtJS under the Lado box Lovcombo_javascript skills

Source: Internet
Author: User
Initially thought it was very simple, add an input checkbox in option. Did not work, online search some implementation methods, mainly using a div layer to simulate the dropdown. I would like to follow this idea, and then combined with the project specific application of their own to write a, found too troublesome. Just in another project to use ExtJS, found an extension Lovcombo, learned its own example (with the version of the 2.3 edition of the extjs,3.x version of the seemingly problematic). The key is to add it to the existing code and make as few changes as possible to the original code.

The process of handling more logic in the use of the Lado box is mainly focused on the configuration of the data source store and the processing of the Select event. The pattern of data and UI separation of the ExtJS itself makes cascading implementations very easy. Just update the store in the City dropdown box in the Select event in the Province dropdown box. A small area to note is that when an option is selected, an additional CheckField value is required to determine whether the option is checked or canceled. Also, select All, deselect all (these two lovcombo with methods SelectAll and Deselectall) and the number of selected options (need to traverse the store and detect the CheckField value of each item).

Copy Code code as follows:

Select Event for dropdown box
Select:function (combo, record, index)
{
Selected
if (Record.get (This.checkfield))
{
Processing logic When selected
}
Else
{
Not selected
}
}

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.