views:

35

answers:

1

I have a data table bound to a data grid view, one of the columns is a list of int32s. What I would like is to have the column display the number with the word minutes after it. I used the cell style builder and in the format i put # Minutes, this works great however rows that have a 0 value does not display anything in the # placeholder so it looks like " Minutes" in the column.

How do I get a custom formatted string to show 0 with text after it?

+3  A: 

try 0 Minutes

For more info, see Custom Numeric Format Strings, Zero placeholder vs. Digit placeholder.

adrift
I was looking for that MSDN page, I was having trouble finding it.
Scott Chamberlain
I had it handy because I just found out about the [section separator](http://msdn.microsoft.com/en-us/library/0c899ak8.aspx#SectionSeparator). It might be common knowledge, but it blew my mind that I hadn't seen it before.
adrift
I wish I could give you a extra +1 for showing me the selection separator.
Scott Chamberlain
Thanks, it's the thought that counts :)
adrift