cancel
Showing results for 
Search instead for 
Did you mean: 

iGrid Number Fromatting Odd Behaviour

Former Member
0 Kudos

I am using MII 12 and attempting to put a comma in a number format in an iGrid. However, when I use something like #,##0 it has no effect on the format of the number in the column. I know it is supposed to work, all the documentation points that way, but it doesn't. Is there a fix? What am I missing?

Thanks for your help.

Accepted Solutions (1)

Accepted Solutions (1)

jamie_cawley
Advisor
Advisor
0 Kudos

Did you try removing the 0?

Jamie

Former Member
0 Kudos

Yes. It is also strange that when I save the iGrid with the format then move to another view (like"Header" or "UI Behaviour" etc.) then return to the layout view the formatting reverts to a single # like it didn't save it at all.

Is this a Java client thing? I am using Java Version 1.5.0 (build 1.5.0_15-b04) on my client.

jamie_cawley
Advisor
Advisor
0 Kudos

Did you click out of the format cell first before moving to another tab? What is the format of this number in xml? Is it really a number or just a string?

Jamie

Former Member
0 Kudos

It is from a query on a SQL Server. The column is numeric(18, 0). I clicked off the field before saving it in the template editor.

Strange isn't it.

jcgood25
Active Contributor
0 Kudos

It could be a bug in the WB, I know it was reported but perhaps your version does not include the fix.

Since the ColumnFormats parameter is by nature a comma separated list it needs to encode the nested commas for thousands separators using ^^

Say you have two columns (ColA and ColB) and you want the thousand separator in ColA and just simple 2 decimals for ColB, the property would look like:

<PARAM NAME="ColumnFormats" VALUE="#^^##0.00,0.00">

It looks like the WB is not doing this, if it appears to save properly and then when you go back to the panel it chokes on the parsing. You may just need to override this in the html for the time being.

Former Member
0 Kudos

Thanks. I know it worked in 11.5. I don't know the patch level on our demo server but I'll check on that. I'll try the HTML solution though it's a pain.

Thanks again.

jcgood25
Active Contributor
0 Kudos

11.5 was the Template Editor, but 12.0 is the WorkBench.

I suspect your demo server is a bit old, because I did a quick test on the latest 12.0 and it works as expected.

Answers (0)