Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Setting Value of igEditor in Acceptance Testing
posted

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?

Parents
  • 500
    posted

    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.

Reply Children
No Data