New Posts New Posts RSS Feed: Percentage Convertor Problem
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Percentage Convertor Problem

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: Percentage Convertor Problem
    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.
Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down