jQWidgets Forums

jQuery UI Widgets Forums Angular Combobox set initial value

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 6 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Combobox set initial value #102139

    leonardo
    Participant

    I used ComboBox.selectItem(“item”) method instead of selectedindex property because I get the item value from a column of data table.
    The problem is onSelect event of combobox is triggered once ComboBox.selectItem(X). It is unnecessary to update the value for the first time because the value is same as value getting from datatable. I can have a variable to count and skip the first time the value is set.But that does not sound like an appropriate way.

    Combobox set initial value #102173

    Martin
    Participant

    Hello leonardo,

    Yes, if you use selectItem method to set the initial value,
    you would have to use the approach that you mentioned with a counter or a flag to skip the first time onSelect is triggered.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.