Author Topic: leading space removed from text column  (Read 119 times)

SDS

  • Newbie
  • *
  • Posts: 8
  • SDS
    • View Profile
leading space removed from text column
« on: July 31, 2024, 05:38:56 pm »
Hi!,
I have a grid column of string type. the data has leading variable spaces in the text. but when displayed it removes the space. the text property of the cell still shows the space embedded but its removed in the grid.
 

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: leading space removed from text column
« Reply #1 on: August 05, 2024, 04:29:50 pm »
empty spaces are trimmed around strings when displaying values in the grid.

To display the empty spaces, you can add a column render.

Code: [Select]
render(ui){
return (ui.cellData || "").replace(/\s/g, ' ');
}