Is there a way to independently render the items of an Ext.form.ComboBox?

Hello,

I have a web application that uses an ExtJS 4 Ext.form.ComboBox.

I need for it to be able to render its items separately depending on their value.  Specifically, I need for the tooltip to be different for each item depending on its value, and - if possible - for some of the items to actually be non-selectable depending on their value.

This seems like it should be pretty simple, but I've spent hours on it and haven't gotten anywhere.  I think I might make be able some headway if I could just get the items within the combobox.  I can do this to its store by using getAt(index) - but this only gives me access to the data, not to the appearance or behavior of the items themselves.

Thanks in Advance
tlmitchAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zzynxSr. Software engineerCommented:
For the rendering, can't you just add an extra field eg. 'displayName' to your model?

Then in your view, your combo is defined like this:
{
     xtype: 'combobox',
     store: ...,
     displayField: 'displayName',   // <<<<<< This will be displayed
     valueField: 'value'                    // <<<< while this is the 'real' value
}

Open in new window

tlmitchAuthor Commented:
Yes - in fact I already have separate a valueField and a displayField that have different values.

Is there any way I can use this to actually disable some of the items?
zzynxSr. Software engineerCommented:
Maybe the answers in this thread can help.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
zzynxSr. Software engineerCommented:
Thanx 4 axxepting
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.