This is a migrated thread and some comments may be shown as answers.

ClientSide ComboBox.Select() method trigger valueChange event ... after next click on the page. Normal ?

1 Answer 108 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
AccMan
Top achievements
Rank 1
AccMan asked on 08 Dec 2011, 03:53 PM
Hello,

I notices that the client side select() function works strangely.
I tried this on your online demos (http://demos.telerik.com/aspnet-mvc/combobox/clientsideapi) and I noticed the same "problem".

1) With Firebug/Chrome, bind to the valueChange  event of the #ComboBox element a simple function : 
==> $("#ComboBox").bind('valueChange', function() { alert('Value changed event triggered'); })

2) Change the index of the value to select, then, press the select button
==> The displayed element of the combobox change, but no event, normal

3) Click anywhere in the page 
==> the valueChange event is fired and the alert message is displayed.

I think this can be a new issue for the combobox component, because I think the select() function should ever trigger this event ... or never :)

Thanks for your answer.

Jonathan

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 12 Dec 2011, 05:48 PM
Hello Jerome,

 
The described behavior is expected. The select method just selects item, but does not prevent the change event. The change event is raised on document click, because the component checks whether the value is changed and the change event is not raised. If you need to set the value of the component and do not raise change event use value() method.

All the best,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
ComboBox
Asked by
AccMan
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or