Skip to Content
avatar image
Former Member

Add and delete rows table odata v2

I am trying to create two buttons to create and delete lines in a sap.m.table, but as I am using oData model V2, I can not use setData() method of model neither add a row directly in the table. I have tried to use createEntry() method but does not create a entry in the table, only if I use submitChanges(). Any help?

Tks a lot.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 22, 2016 at 08:03 PM

    an easier approach would be to use the json model which is a client side model... unlike the odata model which is a server side model.

    if you are able to use a json model, you maybe able to use the javascript function splice... array.splice(0,0, yourNewRow)

    Add comment
    10|10000 characters needed characters exceeded