cancel
Showing results for 
Search instead for 
Did you mean: 

How to set odata in sap.m.Textarea with each data in a row

Former Member
0 Kudos

Hi,

I am trying to populate the text area with the odata from backend.

i need to add each data in a row.Now the data is coming as a single string.

Below is the code i am using

var textData.

for(i=0;i<data.length;i++)

     {

        textData= textData+data[i].Notes;

  

     }

sap.ui.getCore().byId("notes").setValue(textData);

  },

I am getting the data as an appended string.i need to get each data in each row.

I tried to add "/n" & "<br/>"after each data  ,but it is getting appended.

Please help me in solving the issue.

Regards,

Anjaly

Accepted Solutions (0)

Answers (1)

Answers (1)

santhu_gowdaz
Active Contributor
0 Kudos

Sorry it will apply only for text view not for input field.

TextView - SAPUI5 Demo Kit

for(i=0;i<data.length;i++)

     {

        textData= textData+data[i].Notes +"/n";

 

     }

this.getView()..byId("notes").setText(textData);//"notes" should be textview not input field.