Binding to a percentage in 0.1 format instead of 10% format?

Hi, what I'm trying to do is use the "P2" option from StringFormat to make my PercentTextBox bind to a variable that is in 0.1 format instead of 10% format.

What I'm trying to do basically is:
<syncfusion:PercentTextBox PercentValue="{Binding DiscountPercentage, StringFormat={}{0:P2}, UpdateSourceTrigger=PropertyChanged}"/>

Is there a way to do this or do I have to bind it to a full value ?

Thanks

3 Replies

BR Bharathi Rajakantham Syncfusion Team February 8, 2021 03:59 PM UTC

Hi Anthony, 

Thanks for contacting Syncfusion Support, 

We have checked the reported query “StringFormat does not works in PercentTextBox” from our end. Currently our PercentTextBox control support the culture and formatting as mentioned in the below link. We are validating on considering the feature request on this. We will update you the further details on 10th Feb2021. We appreciate your patience until then. 
 
 
Regards, 
Bharathi R 



BR Bharathi Rajakantham Syncfusion Team February 10, 2021 04:26 PM UTC

Hi Anthony, 
 
Sorry for the delay, 
 
We are still validating on the reported query and we will update you the further details on 12th Feb 2021. We appreciate your patience until then. 
 
Regards, 
Bharathi R 



BR Bharathi Rajakantham Syncfusion Team February 12, 2021 01:14 PM UTC

Hi Anthony, 

Thanks for your Patience, 

We have validated the reported query from our end. Percent textbox accepts double values only where you can’t set formatting in binding which will return formatted string. So, you have to bind the value and set format using NumberFormatInfo and currently can’t be able to support the StringFormat feature in our control. Please let us know if you have any other concerns. We will be glad to assist you. 
 
Regards, 
Bharathi R 


Loader.
Up arrow icon