I'm working on acceptance testing for an MVC 4 single page application. I'm trying to automate an editable grid using igGrid and igGridUpdating. As a row is being updated, each cell has its own igEditor to handle editing and validation.
When I try to programmatically change the value of a cell using igEditor, I get the following error: "Unexpected error. Error: cannot call methods on igEditor prior to initialization; attempted to call method 'value'".
The (generic) line of javascript that was called is "$('#gridId').igGridUpdating('editorForKey', 'columnKey').igEditor('value', 'val');"
Any thoughts/help?
Hi Robert,
Thanks for posting in our forum!
The method "editorForKey' may be used while the cell is in edit mode to access the editor for that particular cell (note that the editors may not be created and therefore available if accessed at another time). You could use "updateRow" method instead, i.e.
$("#grid").igGridUpdating("updateRow", 5, {Country: "Bulgaria"});
Thanks,
Dimitar Atanasov
Senior Software Engineer,
Infragistics, Inc.
I'm still following your case. Have you been able to resolve the issue?
Please, feel free to contact me if you have any additional questions regarding this matter.