Community Tip - You can change your system assigned username to something more personal in your community settings. X
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?
Solved! Go to Solution.
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.
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.
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?
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.
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.
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.