Login Register
Sunday, February 05, 2012
You are here : Forum
 
Forums Minimize
 
ForumForumForumForumIndoo Grid DNN ...Indoo Grid DNN ...number format - negativenumber format - negative
Previous Previous
 
Next Next
New Post
 7/22/2010 7:19 PM
 

Hi all, this is probably a dumb question, but how do I format a number to show the negative in parens instead of a minus? like (3.1) instead of -3.1

I'm currently using n1 and have tried things like n1;0 but I'm just guessing.

thanks

New Post
 12/4/2010 8:02 PM
 

Anyone know how to do this? Thought I'd ask again. These are the 2 MSDN pages I've looked at, so I'm sure I missing a basic syntax thing:


http://msdn.microsoft.com/en-us/library/system.globalization.numberformatinfo.currencynegativepattern.aspx

http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx

thanks

New Post
 12/16/2010 10:33 AM
 
 Modified By Lobi  on 12/16/2010 10:43:27 AM

Hey Cutts,

Took some time to solve your issue looking and testing the shitty formatting properties but got fedup and changed strategy. 3 quick steps and you got both full flexibility in terms of formatting, as well as it works like a charm. Here is what I came up with...

1) Database side: Add a column with Absolute version of your column with true/calculated numbers.

2) Use an update statement to ensure the values of AbsoluteNumber and place it in your appropriate SQL triggers in indoogrid (under Onload, after record update or whatevah)

Update NNTEST

Set AbsoluteNumber = ABS(Number) FROM NNTEST

3) Choose 1- Configurable for the AbsoluteNumber column and do the following quick config:


(Sorry forgot a row more with Column (AbsoluteNumber), blank pre- and suffix and a "Number =0" condition so that you dont get blanks whenever your number is 0 ;-))

The "Number" column itself, make it invisible ;-)

I think its a quite flexible solution since it can also be used for currency etc. No "fixed" formatting. But yes an extra column for the jungle ;)

I used Numeric with two decimals and heres what I got (sorry for the strange font ;P)

Have FUN,

Dave

New Post
 12/17/2010 4:45 PM
 

Wow dave, thanks. I'll have to play with this.

I ended up using a view to format the field and pull from that. It just seems like there should be an easier way. Thanks again

Previous Previous
 
Next Next
ForumForumForumForumIndoo Grid DNN ...Indoo Grid DNN ...number format - negativenumber format - negative

  
Buy it Minimize

 

 

  
Home | Demo | Custom Solutions | Downloads | Forum | Company
 
Privacy Statement | Terms Of Use
 
Copyright 2008-2009 IndooLab d.o.o.