Balsamiq Community Discussion

Numbers with commas in datagrid

Hi there,

I have a question about displaying numbers with commas. It’s not been an issue before, but the exact thing I want to prototype is the exact thing I can’t. :slight_smile:

I’m using a datagrid to prototype a table of invoices. It looks like this:

image

In the Value ($) column, the amounts do not display sensible thousands-separator (i.e. ‘,’), i.e. line 1 of the table for Maya Summit the value is $8000.00, but I want to display $8,000.00.

I’m familiar with formatting the datagrid element, but cannot find a way/workaround to display commans between the thousands and hundreds.

Any help on finding a workaround? Or is there any plan to provide a different way to format the datagrid so we can use commas in the data? I’ve tried tabs to separate the table columns like so:
image

but that gives me this:
image

Thanks.

Hi @bernard!

I’ve added your vote for supporting the use of commas in the Data Grid control. In the meantime, you can work around this by adding \ before the comma.

Hope this helps! :slight_smile:

Hi @Virgin Thanks very much for replying and providing the answer. That solution is, I think, a perfectly acceptable answer. I just wasn’t aware of it being possible, hence my posting here.

I don’t think any support necessairly needs to be added - this works the same as for adding a new line.

I do suggest adding the string1\,string2 to the datagrid sample text that’s shipped with Balsamiq - so it can be more easily discovered by a user (like me!).

Maybe as follows:

image

Change the sample markup from this:
image

which gives the following sample datagrid:
image

to this markup:
image

as then the markup for commas is fully visible:
image

Not much development time needed. :wink:

whadda-ya-think?

Yup. One of the things we want to improve with the Data Grid is feature discoverability.

While it wouldn’t take long to adjust the template, I don’t think we will get a chance to look at the Data Grid until later this year (when we will start rewriting it completely).

Hi @Brendan I think the current way functionality is discovered (i.e. by having some sample datagrid contents) is actually good - as long as it covers examples of the different features.

When I add a grid, I can see directly in Balsamiq what I can do.

1 Like

I would prefer Balsamiq to be more aware of i18n, meaning that it should autodiscover the operating system’s use of separator (there are APIs for these things). Then automatically set the separator as desired, and adjust the example accordingly.

Alternatively, give poeple more freedom in settings for different types of objects. It would be great if I could choose to set separator to “§” if that suited me to do so - and allow for both comma and dot and semicolon.

That may be a little too much for our little app @hsatech, but we will definitely investigate it!