Skip to Content

Add several rows to odatamodel.V2 without posting to backend and display in SmartTable

Nov 23, 2016 at 10:04 AM


avatar image


I need to create records in oDataModel and display them in SmartTable. After user press "Save" I need to SubmitChages or DeleteCreatedEntries.

When I try to add new entry to model (oModel.CreateEntry) it is not displayed in table (but exists in model with temporary key). I've tried to refresh binding ( SmartTable.getTable().getBinding("rows").refresh() ) but without success.

Could somebody advice how to add several rows to smarttable without posting to backend\server?

I use oDataModel V2 with TwoWay Binding.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Tom Parsons Nov 23, 2016 at 10:18 AM

Hi Mikhail,

You need to copy your data into a JSON model and bind that to your table.

See here:

10 |10000 characters needed characters left characters exceeded
Mikhail Drazdou Dec 03, 2016 at 07:38 AM

Hello, Tom!

Thanks for you advise! The solution with JSON Model is easy to implement and support. My final solution uses JSON model to display records in the table, but CRUD operations get executed with ODataModel.

Now I'm able to add row to SmartTable(overview table) and display SmartForm(Details) with selected Entry\Entity. SmartForm context has binding to oDataModel and on context change it will update oDataModel and then JSON model.


10 |10000 characters needed characters left characters exceeded