Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to prevent sap.ui.table.Table from displaying "multiline" rows when data contains carriage returns?

Yesterday, the sap.ui.table.Table I am using in my app started displaying the the rows (which contain carriage returns/newlines in the data) as having multiple lines of data (no change in data). I'm not certain how this happened, but it has the unwanted effect of making the table's height adjust as the user scrolls through the data (and if it extends past the screen height, things get really fun with table and page resizing). I wouldn't really mind the multi-row look if it was possible to have a fixed height on the table, so that partial rows would show, as with classic native app programs do. I've looked through all the properties, and I didn't see anything that I could imagine would have the desired effect. If it matters, I am using TextViews for my columns because I don't desire the data to be editable in the table due to the size/formatting of the data.

So to get to the point, is there a way to either:

1. Force the sap.ui.table.Table to display only one line, followed by "..." when the data extends past the column bounds as it was previously doing

or 2. Force the sap.ui.table.Table to have a fixed height and show partial last rows, similar to native app tables?

Thanks!

Tags:
Former Member replied

yes, carriage returns will cause it to wrap.

Here is the proof.

http://jsbin.com/kavuv/edit?html,js,output

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question