-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I'm using a list in combobox which containd same label but its value is different,but the problems is that it is treating each those comboitems as same which has same label value. So on change event doesn't get fired up if you select one item with label as "low" and try to select another item with same label.
here is my demo code:-
<combobox width="58px" id="combo" onChange="@command('click')"
autodrop="true"
readonly="true">
<comboitem value="1" label="D" />
<comboitem value="2" label="Low" />
<comboitem value="3" label="Low" />
<comboitem value="4" label="Low" />
<comboitem value="5" label="Mr" />
<comboitem value="6" label="Ms." />
<comboitem value="7" label="Lor" />
</combobox>
I am using the value assinged to each comboitem in my VM ,but it is taking only one value for every item with same label,i think the value of first item with same label. help me out guys.
@nsharma you can use onselect event instead of onchange event
Why not use Listbox with mold = select? According to the ZK Component Reference : A combobox is a special text box that embeds a drop-down list. With comboboxes, users are allowed to select from a drop-down list, in addition to entering the text manually.
This means, anything that you selected from the drop-down list will be assigned to the textbox of the combobox from the label of the comboitem, not from the value.
If you want to use the value (not the label), use the listbox item. Or, use different label for each comboitem.
@nsharma actually onselect idea not good you can find different idea to solve this issue
Asked: 2013-03-16 13:07:10 +0800
Seen: 92 times
Last updated: Mar 21 '13