I have a GridBoundColumn in my grid that holds a decimal that is formatted using this DataFormatString: "{0:#,0.00; (#,0.00);0.00}"
This has the effect of putting brackets around negative numbers, which is what the user has requested, and it works just fine.
At runtime I need to access the unformatted value of this column, i.e. instead of (100,000.00) I need -100000.00. If I use Decimal.Parse() I get a format exception, so I'm wondering if there's a way to access the value that I need via GridDataItem or any other method? I'd really like to avoid having to strip the brackets and add the negative sign manually in code.
Thanks in advance,
Rob
This has the effect of putting brackets around negative numbers, which is what the user has requested, and it works just fine.
At runtime I need to access the unformatted value of this column, i.e. instead of (100,000.00) I need -100000.00. If I use Decimal.Parse() I get a format exception, so I'm wondering if there's a way to access the value that I need via GridDataItem or any other method? I'd really like to avoid having to strip the brackets and add the negative sign manually in code.
Thanks in advance,
Rob