View Poll Results: Should this functionality be implemented?
- Voters
- 1. You may not vote on this poll
-
TOTALLY
1 100.00% -
NOPE
0 0%
-
23 Oct 2012 7:15 AM #1
Answered: How to disable an option in Ext.field.Select?
Answered: How to disable an option in Ext.field.Select?
Hi there,
I have the following construct to create a select:
where I want to disable some options to show the user that they are there, but are not selectable.Code:Ext.create('Ext.field.Select', { renderTo: Ext.get("displaySizes"), xtype: 'selectfield', label: item.label, options: [ { disabled: true //<- does not work text: "36" value: "1235" }, { disabled: false text: "40" value: "1234" } ] }
Just as it would work using html:
Anyone able to help me out?HTML Code:<select> <option value="1235" disabled="disabled">36</option> <option value="1234">40</option> </select>
Thx
-
Best Answer Posted by mitchellsimoens
You would need to add some select listeners to the list or slots with order before and return false. You would also have to style an option that is disabled.
-
24 Oct 2012 6:48 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,639
- Vote Rating
- 435
- Answers
- 3106
You would need to add some select listeners to the list or slots with order before and return false. You would also have to style an option that is disabled.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
25 Oct 2012 3:06 AM #3
Set property....
Set property....
Hidden:True
-
25 Oct 2012 3:57 AM #4


Reply With Quote