ExtJS 3.4 :: Combobox in grid - wrongly selecting first value when opened - extjs

Using ExtJS 3.4
I have a EditorGridPanel and columns with ComboBoxs.
Just noticed that if I three options, say...
Dog
Cat
Mouse
...and Mouse is the saved value, then when I click the dropdown, my field gets populated with Dog - without me selecting it. Whatever the options, my field gets populated with the first value.
This only happens after an initial page load and the first time I click a combobox. Subsequent combo clicks do not elicit this behavior.
Anyone experienced anything like this? Any clue?
Thanks
Paul

autoSelect : false
for combobox component will solve this. Read ExtJS Documentation for more details.

Related

Grid: How to prevent row deselection on hit Enter?

My grid uses CheckboxModel and CellEditing plugin. When the user types something in a field and hits Enter button, then I see that checkmark disappears from the first ckeckbox column. But at the same time getSelectionModel().getSelection() shows, that one row is still selected. This behaviour is quite weird and may confuse ordinary users. So, I need some workaround.
Here is a picture of what is going on. Before:
After:
As you can see, there is no longer checkmark in the first column and no selected records, but getSelection() still shows one record being selected.
After enter you could try fetching the record you had edited and use grid.getSelectionModel().select(record, true, false)

Change view of form on click of button or checkbox

I have to make a form codename-one in which i have a check box. if check box is checked then bellow it i want to display 2 combo box and if check box is unchecked then i want to display 2 text field.
How can i do it.
I have tried setVisible(true/false) but in it space consumed by label or text field is never covered up.
Please help.
You need to remove/add the components and then invoke either revalidate() or animateLayout(int) to refresh the UI.

silverlight combobox - highlight a few items in the popup list

I'm wondering if I can make fake sections in the popup menu:
The rule would be, if the 5th character of the displayed item is different from the 5th char of the previous item in the menu, it has to be highlighted
What do you think?
Thanks!
To achieve this would be a hack.
Normally the items that appear in the popup part of a combo box will be an instantiated data template, and each gets its own data item and has no clue or knowledge of the other items in the list, so you couldn't use a converter or anything else to achieve this behavior.
What you could do though is inject (attach) your own control into the popup part of the combo box, and take over the rendering of the data items. How you do this will depend upon which combo box you are using (i.e. MS or some other vendor's) and would be a whole new question.
Would that be easier if I were to create my own combobox as follow:
a TextBox associated with a Button that when pushed would popup a datagrid in which I could implement this conditional formatting?

How i can turn off autocompletion in Extjs combobox?

When I selected some item in combobox and then I'm trying to select another item in same combobox, I can see only one item - those which is selected right now. I believe that happens because of autocompletion. Does anybody know how I can disable it or something. I need to see all values on each click, regardless if something was selected already or not.
Add triggerAction:'all' to your config.
better add disableKeyFilter:'true' to your combo box

Alternative Content for a Selected ComboBoxItem

I need to place a ComboBox in a place where I have very limited space. Is there any way to show content for the SelectedItem in the ComboBox that is different than the content that is displayed for the item in the ComboBox's Popup?
As an example, Firefox does this with it's Site Search box in the top right of the browser. When you open the dropdown, the site names are displayed along with their respective logos, but when a site is selected, only the icon is displayed.
UPDATE: Solution found :-)
I found a solution at this site:
http://blogs.windowsclient.net/airborneengineer/archive/2009/06/25/wpf-styles-and-templates-part-ii-combobox-customization.aspx
I just needed to modify the "DisplayImageWithText" DataTemplate to only show the field I want.
Yes, have 2 sets of data and change the display member column of the combobox - according to the position. as long as the value is the same, it will work good, and you'll get 2 displays out of the same combo-box.

Resources