I am in the process of migrating a few of our applications from v14.2 to v16.1. One of the biggest breaking changes is the base igEditor control is missing:
http://www.igniteui.com/help/api/2015.1/ui.igeditor.html (available)
http://www.igniteui.com/help/api/2015.2/ui.igeditor.html (missing)
http://www.igniteui.com/help/api/2016.1/ui.igeditor.html (missing)
I see in 15.2 that all of the editors were overhauled. More details can be listed here: http://www.igniteui.com/help/whats-new-in-2015-volume2#new-editors
We dynamically iterate through all editors on the grid to provide extended functionality. In the past I would be able to simply say
$(.selector).on("iggridupdatingeditcellstarting", function (e, ui) {
var editor = $(ui.editor).data("igeditor");
if (!editor) {
editor = $(ui.editor).data("igCombo");
}
// EDITOR IS NULL!
};
Now I have to interrogate every possible editor to figure out which type it is! I need to subscribe to key up events.
igEditors:
We used to use the "igeditorkeyup" event.
$(editor).on("igeditorkeyup", function (){}});
igCombo:
We used to use to subscribe the "keyup" event on the $(editor).fieldElem element.
$(editor.fieldElem).on("keyup", function (){})};
How do I do this in a generic fashion with the new set of editor controls?
Hello Karthik,
Thank you for using our community.
As you mentioned there was a breaking change in the Ignite UI controls from version 15.2. We have created and build brand new editors based on other architecture in order to provide a better functionality for our controls. For all of the editor we have created a migration topic that should help you migrate from the old ones more easily. Here are the links to those topics:
http://www.igniteui.com/help/migrating-to-the-new-igtexteditor (igTextEditor)
http://www.igniteui.com/help/migrating-to-the-new-ignumericeditor (igNumericEditor)
http://www.igniteui.com/help/migrating-to-the-new-igmaskeditor (igMaskEditor)
http://www.igniteui.com/help/migrating-to-the-new-igdateeditor (igDateEditor)
http://www.igniteui.com/help/migrating-to-the-new-igdatepicker (igDatePicker)
http://www.igniteui.com/help/migrating-to-the-new-igpercenteditor (igPercentEditor)
http://www.igniteui.com/help/migrating-to-the-new-igcurrencyeditor (igCurrencyEditor)
You cannot use igEditor as a reference to all of the editors anymore, you need to access them separately.
If you have further questions, let us know.
Best Regards, Marina Stoyanova, Software Developer, Infragistics, Inc.
That sucks. Here's why. Let's say we have a grid and I want to subscribe to the cell starting event. In the UI object it'll give me the columnKey and an editor object.
The "best practice" way is to switch on the columnKey so I know which column I am using but now I have to switch provide another switch for the type of editor because their is no common base class.
Question: How can I determine the type of editor that is being passed from the ui.editor field without iterating through them all?