hello
please help me!
i have an numeric editor. i want to change value on event keydown but i don't know how to
here is my code
$(document).delegate("#cpsngIssueAmt", "ignumericeditorkeydown", function (evt, ui) { var code = evt.originalEvent.keyCode; if (code == 77) { var tmpValue = $("#" + ui.owner.options.inputName).igNumericEditor('value'); if (tmpValue != undefined && tmpValue != null && tmpValue != "") { $("#" + ui.owner.options.inputName).igNumericEditor('value', tmpValue * 1000); } } });
i wish when user press 'm' and then i set the numeric editor value = current value * 1000. but nothing happends
can you help me
thank you very much!
Sorry but it could not work. i pressed 'm' but nothing happened
can you re-test it, please
thanks you very much!
Hello Cuong Tran,
Thank you for posting in our forums!
After researching this some, there is an issue with updating the display in the editor correctly. In our newer bi-weekly builds this issue has been resolved. If you would like to use our latest bi-weekly build until the next service release is available, you can download it here:
http://builds.infragistics.com/products/IgniteUI/2015.2/IgniteUI_20152.2146_SR.zip* Please note that our bi-weekly builds are provided between Service Releases and they are not fully regression tested and are not recommended to be used in production environments.
The one thing in your code I noticed I would recommend changing is using ui.owner.element instead of $("#" + ui.owner.options.inputName). The ui.owner.element argument is the jQuery object for the editor and is less error-prone than using the inputName option. You can see an example of how I use this below:
$(document).delegate("#cpsngIssueAmt", "ignumericeditorkeydown", function (evt, ui) { var tmpValue, code = ui.key; if (code == 77) { tmpValue = ui.owner.element.igNumericEditor('value'); if (tmpValue != undefined && tmpValue != null && tmpValue != "") { ui.owner.element.igNumericEditor('value', tmpValue * 1000); } }});
If you have any further questions or concerns with this, please let me know.