Gabriel Posted September 21, 2018 Share Posted September 21, 2018 (edited) Hi, I have an issue with the UniStringGrid. The problem is with the visualization and the edition of the information. The visualization is like html, but the edition es plain text. Is there a way to work always with plain text? This is how the information is viewed: If I edit the field There is a lot of white space (that is correct). The only way to replicate the white space is adding , but of course that the end user will not use that. So, basically what i am asking is if there is a way to change the view of the UniStringGrid to show the white spaces. Regards Edited October 2, 2018 by gmarazzi It whas solved! Link to comment Share on other sites More sharing options...
Gabriel Posted October 2, 2018 Author Share Posted October 2, 2018 ¿Does enyone have any idea have to do this? Link to comment Share on other sites More sharing options...
Sherzod Posted October 2, 2018 Share Posted October 2, 2018 Hi, Sorry for delay Can you make a simple testcase for this ?! Link to comment Share on other sites More sharing options...
Sherzod Posted October 2, 2018 Share Posted October 2, 2018 Ok, You can try to use this approach: 1. ServerModule -> CustomCSS: .customSG .x-grid-cell-inner { white-space: pre; } 2. In designtime for example: UniStringGrid1 -> LayoutConfig -> Cls = customSG 1 Link to comment Share on other sites More sharing options...
Gabriel Posted October 2, 2018 Author Share Posted October 2, 2018 Hi. Sure!. I attach the sample aplication. As you will see there is a small UniStringGrid in the project On the creation event, i set the values: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniStringGrid1.Cells[0,1] := 'This Cell has no spaces'; UniStringGrid1.Cells[0,2] := 'This Cell has a lot of spaces'; end; As i said, i didnt find a way to show the spaces on the cell (0,2). But if you edit the cell the spaces are shown correctly. Let me know if you need anything else. The same issue happen if i edit the fields manually. Regards UniStringGrid.zip Link to comment Share on other sites More sharing options...
Sherzod Posted October 2, 2018 Share Posted October 2, 2018 1 minute ago, Sherzod said: Ok, You can try to use this approach: 1. ServerModule -> CustomCSS: .customSG .x-grid-cell-inner { white-space: pre; } 2. In designtime for example: UniStringGrid1 -> LayoutConfig -> Cls = customSG Sorry and thank you for the testcase Please check above solution 1 Link to comment Share on other sites More sharing options...
Gabriel Posted October 2, 2018 Author Share Posted October 2, 2018 Just now, Sherzod said: Sorry and thank you for the testcase Please check above solution That works great! Thanks 1 Link to comment Share on other sites More sharing options...
Sherzod Posted October 2, 2018 Share Posted October 2, 2018 Very good! Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now