Skip to Content
avatar image
Former Member

To refresh Data in Table after creating a record or Deleting or updating

Hi ,

I created a UI5 app where I am doing crud operations by consuming oData.

I am able to do CRUD operations but when I create a record its saving in the backend, but  its not refreshing in the frontend.

Once I refresh application again I can see the created row.

once I  create row , I am unbinding Items from table

var tableBinding = sap.ui.getCore().byId("DetailsTable");

  tableBinding.unbindAggregation("items");

  tableBinding.removeAllItems();

Its unbinding later I am calling my model and setting data to table as I did for "READ" but I am unable to Bind.

could any one please assist me.

Thanks&Regards

Viswanath.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jan 02, 2015 at 02:22 PM

    You don't have to unbind the items and rebind again. You can do,

    oModel.refresh(true);
    

    This will refresh the model with the latest changes.

    Add comment
    10|10000 characters needed characters exceeded