Skip to Content

Update table populated with oData svc dynamically with row index

Hi,

I have a table like this: rwtab.jpg. Now I want to update records. So I have written this: rw1.jpg but I am still unable to fetch any row by its index as the index is always returning as null i.e. rwdeb.png. Can anybody help me please? Thanks!

rwtab.jpg (184.1 kB)
rw1.jpg (173.9 kB)
rwdeb.png (152.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Oct 25, 2017 at 01:50 PM

    what you are trying to do? why you need the index?

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 25, 2017 at 01:10 PM

    probably you just don't have any row selected...

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2017 at 07:02 AM

    Hi Tridwip,

    For getting the index of selected row you can do like this on click event.

    function : selectFun(oEvent){
       var sPath = oEvent.getSource().getBindingContext("modelName").getPath(); 
       //From this path you can use split() function and get the index
       
       // Get selected row object
       var oSelRow = oEvent.getSource().getBindingContext("modelName").getObject(); 
    }
    Add comment
    10|10000 characters needed characters exceeded