Search code examples
jquerygridshieldui

Shield ui grid how to find the rowIndex by sui-updated-marker


I am trying to get the rowIndex of the recently updated cell. You can find out my approach below :

 getCustomEditorValue: function (e) {
                e.value = $("#qntyBox").val();
                if (!isNaN(e.value)) {
                    console.log(e.target.contentTable.find('.sui-updated-marker').get(0).rowIndex);
                }
            } 

but it shows me undefined in the console output.

But

console.log(e.target.contentTable.find('.sui-updated-marker'));

gives me

Object { length: 0, prevObject: Object, context: undefined, selector: ".sui-updated-marker" }

Any help would be appreciable. Thank you.


Solution

  • Simply change the

    e.target.contentTable.find('.sui-updated-marker').get(0).rowIndex;
    

    with

    e.target.contentTable.find(".sui-editable-cell").get(0).parentNode.rowIndex;