cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Table Responsive with input fields

0 Kudos

Hello,

I have a smart table responsive table type. I have items with individual items to bind data to my smart table. In my smart table, the first two columns are editable, for that i am using sap.m.Input control.]

My issue: When i edit my text and switch to display mode, i see the displayed text.

When i switch back to edit, i see not the original text but the one i edited.

I am trying to reset my edited changes back to what was before.

http://veui5infra.dhcp.wdf.sap.corp:8080/snippix/#22868

I have attached a similar snippix. If you edit ALFKI to ALFKI2, Then switch to display mode, you will see ALFKI. But when you switch back to edit, you will see ALFKI2, not ALFKI. I tried rebinding the table, but this does not work.


Any ideas appreciated. Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member182862
Active Contributor
0 Kudos

Hi Abhishek

By default, oData model is one way binding. You need to see it to two way binding

				oModel = new sap.ui.model.odata.v2.ODataModel(sURL, {
					json: true
				});				
				oModel.setDefaultBindingMode("TwoWay");
				oView = this.getView();
				oView.setModel(oModel);

Thanks

-D

Answers (0)