cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to display the values in 2 rows for a single cell in grid?

bmarimuthu-2
1-Newbie

How to display the values in 2 rows for a single cell in grid?

column.png

Here, I got the data for "SchedAtt" column from database. I want to display the values in 2 rows for the single cell in grid.

Eg:  "704 1151 " as    704

                                1151 within the single cell.

How to align this in grid?

1 ACCEPTED SOLUTION

Accepted Solutions

I have found that the values can be displayed in 2 rows for a single cell by modifying the service in Javascript and rendering it with <br> in the code.

And also in "configure grid columns" , I have changed the "Column Renderer & State Formatting" into Html and "Format"  to "With Formatting"

This resolved my issue.

View solution in original post

9 REPLIES 9

Hi Bavithraa, do I understand it correctly that all that data is stored in a single column in the database table? If that's the case you'll have to post process it by splitting the values via a service.

Or else why not create a view in the database directly on that table storing the value you like to be displayed.

ankigupta
5-Regular Member
(To:supandey)

Hi Sushant Pandey​,

Per my understanding Bavithraa Marimuthu​ wants to insert a new line character between 704 and 1151 so that they show in different lines in the same cell.

Exacly Ankit!! I want to insert a new line character between 704 and 1151. Is there any other way to resolve this?

supandey
19-Tanzanite
(To:ankigupta)

If all the data is coming in from the database table, creating view would be the simplest I could think of, if such a data join is just cosmetic.

ankigupta
5-Regular Member
(To:supandey)

As per my testing Grid widget does not identify \n as new line character. Also, if we pass the data in two lines; Grid widget replaces it with space.

I have found that the values can be displayed in 2 rows for a single cell by modifying the service in Javascript and rendering it with <br> in the code.

And also in "configure grid columns" , I have changed the "Column Renderer & State Formatting" into Html and "Format"  to "With Formatting"

This resolved my issue.

ankigupta
5-Regular Member
(To:bmarimuthu-2)

Hi Bavithraa Marimuthu​,

Great! Could you please mark your answer as correct so that other members know that this Thread has a Solution?

Hi Bavithraa, if you just want the data in cell to show in different rows (message too long, or show them in two rows by design), instead of being overlapped, you can set the property CellTextWrapping to true, I think that's the easiest way to do so.

But that is not working properly.

And Moreover I want only certain column values to be wrapped up, Not all the column values.

Top Tags