Android Question [Solved] B4XTable and comma separator in integer values

asales

Expert
Licensed User
Longtime User
In my country we use the comma as decimal separator and the dot to the thousands separator.

Is possible to set all the fields with a integer number in B4XTable to uses this format?

How I can format the values marked in the image below?
1,561 -> 1.561
3,120 -> 3,120

Thanks in advance.

b4xtable_number3.jpg
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Yes.

SS-2019-02-21_08.28.03.png


Add this code before you add the columns:
B4X:
B4XTable1.DefaultFormatter.GetDefaultFormat.DecimalPoint = ","
B4XTable1.DefaultFormatter.GetDefaultFormat.GroupingCharacter = "."
B4XTable1.DefaultDataFormatter = B4XTable1.DefaultFormatter

And:
B4X:
Sub B4XTable1_DataUpdated
   B4XTable1.DefaultFormatter.FormatLabel(B4XTable1.CurrentPage, B4XTable1.lblNumber)
End Sub
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
How did you get the top row with the navigation buttons and the search box to look so much better than the old look. I downloaded v109, but it still shows the old look like in asales screenshot.
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
Looks like Erel' screen shot is from B4J and yours from B4A, my guess.

Regards,

Anand
 
Upvote 0
Top