cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 remove row thoughs "Uncaught TypeError: oModelData.splice is not a function"

0 Kudos

Hi all,

I got an issue with the "sap.ui.table".

I created a XML view and want to remove a row.

In the internet I found only examples with JS-views. So I try to adopt the coding to my example.

On https://archive.sap.com/discussions/thread/3578776

I found for removing/deleting a row:

var data = oModel.getData();
data.splice(index,1); 

As you can see oModelData is an array of 5 Products:

But the following line throws an error:

I don't have any idea why this is not working for me?

Thanks

Regards

Mario

View Entire Topic
maheshpalavalli
Active Contributor
0 Kudos

Its oModelData.Produucts.splice()... That is not an array and it's an object and that is the reason why splice is not working.. but the object has Products property, which is an array and here you need to apply splice.

BR

Mahesh