How can I change the cell values font color in edit more conditionally?
Sure, you can use the findRecordByKey function to get the record being edited. In the context of the editRowStarted event handler the call will look like this:
ui.owner.grid.findRecordByKey(ui.rowID);
Best regards,
Stamen Stoychev
I do have a follow up question. I need to change the color in edit mode conditionally only. So I am doing this is "editRowStarted" event handler. I need to do based on other cell values (hidden). Is there a way to read all cell values when editRowStarted is raised? I could not find a way to do it. If not is there a work around for that?
Stamen - Thanks for getting back on this so quickly. It definitely works!
Hello,
It looks like the editorForKey fix didn't make it for the December's SR which is causing your issue. Basically what is returned by editorForKey is the editor's DIV container and not the element it is actually initialized on so you can't directly call editor methods on it.
I've prepared a sample showing how to circumvent this as well as another approach based on the dynamic change of the editor's value as the end-user types (it may come useful for your application).
Please, have in mind that you will need to remove the ".find("span:first")" part from the editRowStarted handler when you choose to upgrade to a future SR or newer version of Ignite UI.
Let me know if you have any other questions or concerns! Thank you for using Infragistics forums!
Stamen - It is a string column and I am trying to initialize a text editor - igTextEditor like this...
$('#grid').igGridUpdating("editorForKey", "LastName").igTextEditor("field").css("color", "red");
I am using latest (Dec 11, 2015) service release. Not surewhat else am I missing.