Page 1 of 1
Space after values
Posted: Thu Dec 21, 2023 7:58 pm
by Cedric
everytime i have a value in the code on a page it automatically places a space behind the value it get out of the database which i dont want because i want to place a comma after the value i have looked but i cant find a solution to the problem. has anyone had this same problem as me and solved it or found a solution
Re: Space after values
Posted: Fri Dec 22, 2023 6:12 am
by MichaelG
You can use the Row_Rendered server event to trim the spaces. For example:
Field.ViewValue = ConvertToString(Field.CurrentValue).Trim(); // Trim spaces for ViewValue
Field.EditValue = ConvertToString(Field.CurrentValue).Trim(); // Trim spaces for EditValue
Re: Space after values
Posted: Tue Dec 26, 2023 12:55 am
by w.saeed
Hi
If you use Ms. SQL DB, you should put Database Filed type as Varchar instead of Char.