Hi,
In my igGrid ,The data in one of the columns have multiple spaces between characters such as "aa bb", but when it is bounded,the extra spaces are removed and shown as "aa bb". I wanted to bind my data as is however it is there in the db. Can some one help me in fixing this issue.
Thanks & Regards
Nagaraju P
Hello Nagaraju,
How did you insert the spaces in your datasource? Did you just tap on spacebar or you used the reserved HTML non-breaking space like " "? The second one works fine on my side and displays the record with spaces. Attached is a sample for your reference.
If you have any questions, please let me know.
Sincerely,gridDSwithSpaces.zip
Tsanna
Thanks for your quick replay ,i did tap on space bar and it is saved in the database with the spaces, i tried to bind the same data which is there in the database.
Mine is not the editable grid.i am just trying to bind the data as is ,however it is there in the database.
I also think you should use html reserved entity character for non-breaking space...
I don't think that auto-sizing has something in common with column formatting. The last operates on the datasource.
Thanks for your replay,
Is there any better solution ? because I need to implement across all my Grids and i am also not sure ,how it’s going to work across all the browsers and devices. Also can you please let me know if auto Sizing the column is turned on ,implementing the above solution is going to create any impact? if not I am ok with this solution.
Nagaraju
Instead you may use column formatter function: https://www.igniteui.com/help/api/2017.1/ui.iggrid#options:columns.formatter and get the respective value that contains spaces and replace them. Here is an example how to replace white-space: https://stackoverflow.com/questions/1731190/check-if-a-string-has-white-space
Tsanna the users are entering the extra spaces so using the   is not a solution. We need another way to support this. Do you have any suggestions as it's causing issues for our clients.