PDA

View Full Version : Combobox- set value to first selection



JohnJones357
9 May 2014, 9:44 AM
how can i set the default combo value to the first selection in the drop down? the list of selections will always be different based on user so i cant use setValue( ) or value:

thanks

Scott Mildenberger
9 May 2014, 10:17 AM
I think autoSelect : true, might do what you want if I understand correctly.

oussama.khalfaoui
13 May 2014, 7:44 AM
you can get the store (combobox.store) and then set the value you need dynamically (for the first selection you have to pick the field you need from the first record: store.getAt(0).data.field )