Just in case anyone else is trying to handle events on this control, and was having a hard time with the lack of examples / misleading documentation, here's the way to do it:
$('#yourID').bind('igcurrencyeditorvaluechanged', function(){
alert('This fires when the value is changed');
}
All of the events are listed at the link below. However, they don't work as listed, you'll have to prepend them with "igcurrencyeditor" as I've done above.
http://www.igniteui.com/help/api/2015.2/ui.igcurrencyeditor
Hope this helps some people out. Infragistics, update your docs!
Hi JoshNoe,
Did you see the code samples for the events in the API documentation? We have code samples for each option/event/method in the API Docs.
For example following is the sample for the event which you pointed(http://www.igniteui.com/help/api/2015.2/ui.igcurrencyeditor#events):
[code]
$(document).delegate(".selector", "igcurrencyeditorvaluechanged", function (evt, ui) {
//gets the new value
ui.value;
//gets the old value
ui.oldValue;
});
[/code]
Prepending widget name when binding for event is jQuery UI convention. The following wiki page have a good explanation of the jQuery UI Widget Factory on which we base our widgets: http://wiki.jqueryui.com/w/page/12138135/Widget%20factory. (Search for "this.widgetEventPrefix" section which describes event name resolution.)
We also have topic on events in our developer documentation:
https://www.igniteui.com/help/using-events-in-netadvantage-for-jquery
Hope this helps,
Martin Pavlov
Infragistics, Inc.
Thanks Martin. You're correct and the documentation does spell this out pretty well if you read through it in detail, which admittedly it looks like I didn't .
I guess the crux of the issue is that the events are listed in the documentation without the prepended control name, which, for someone coming from a traditional js objects background, not a jQuery widgets background, can be very confusing. I wouldn't assume that everyone accessing the documentation knows about jQuery widgets and their conventions, or even that these controls are jQuery widgets. I'm not the developer at our company who initially downloaded these controls, so I just stepped into the documentation blind.
Maybe there should be a sticky thread at the top of these forums on jQuery widgets? Would have saved me a lot of time...