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
How to get row values on edit row started event?

I have an igGrid that allows row updating. I need to be able to call a method and get the current row values when the user starts to edit to the row, yet for some reason the 'editRowStarted' event does not return a reference to the values of the row. 'editRowEnded' is a good example of what I want - it allows you to access the values of a row simply by calling 'ui.values' on the ui parameter of the function. I know that 'editRowStarted' does return the 'rowID', but I have not been able to use that to get the values from a row. I'm sure this is a simple fix that I am overlooking.

No Data
  • 30
    Offline posted

    I was able to get the values, but the way it was done is not preferred. I don't want to have to pick apart my document to get the values I need. There should be (and probably is) a way to return a JSON object, or at least some sort of structured data.

    var row = $('.selector').igGrid('rowById', ui.rowID)[0];
    var dataID = row.getAttribute('data-id');
    var cellValue = $('.selector_table tr[data-id="'+dataID+'"] td[aria-describedby="selector_table_ColumnTitle"]').text();

    P.s. the code editor on here is awful. The cursor does not insert or delete characters at the position clicked and shown....