Print Page | Close Window

Percentage Convertor Problem

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=140
Printed Date: 28-Mar-2025 at 1:34am


Topic: Percentage Convertor Problem
Posted By: Customer
Subject: Percentage Convertor Problem
Date Posted: 12-Jul-2007 at 11:00am
I am receiving the error ".NET cannot yet parse percentage formats" when converting to a text box to a percentage format see code:
 
Dim PercentConvertor As New IdeaBlade.UI.NumericConverter(GetType(System.Nullable(Of Decimal)))

PercentConvertor.FormatString = "p"

mCtlBMgr.Add(Me.txtMarkupAmount, "MarkupAmount", PercentConvertor)

The text box displays correctly until I try to change the value, then I get the error. I have to press escape to get it to return to its original value.



Replies:
Posted By: IdeaBlade
Date Posted: 12-Jul-2007 at 11:01am
 
This turns out to be a long-standing problem.  The root of it is, as the message states, in the .NET parsing of percentage values which we have not yet been successful in dealing with appropriately.  Our chief architect spent some time today looking at this and was unable to come up with a satisfactory resolution, which means that it is a very difficult problem to solve.
 
The easy workaround is to use a different formatting, but we can understand that that might not be satisfactory.  It may also be possible to write a custom converter.  DevForce does support adding a custom converter to your form project.  The problem with that is that you may run into the same problems that are keeping us from solving it in the framework.
 
We will look into this further but unfortunately we cannot promise a quick resolution.



Print Page | Close Window