Is it possible to create multilevel combobox using ExtJS 4.0? I mean, that it should have, for example, these options:
- This
- Month
- Year
- Last
- Month
- Year
This and Last options should be not selectable.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This absolutely is possible.
You can define a template for your combobox which defines how the row is displayed. What you can do is have the store have a field which defines the type of record, such as a boolean header field.
In your xTemplate which you pass into the Combobox’s tpl config, you can check the value of that field and if it’s a header apply separate styling. Then, add a beforeselect listener and if the record’s header field is true, return false.
I saw something similar on the Ext website, but can’t locate it right now. If you need more details, let me know.