Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1145
UltraNumericEditor Percent Handling
posted

UltraNumericEditor Version 18.2. Looking for a working example where the user can enter the whole percent value they want (e.g. 0.55), have 0.55% displayed in the control, but have the underlying value be 0.0055. It is rare I need post questions but I have been unable to solve this after a day of searching. I think I am close after re-purposing the IEditorDataFilter code from here ( http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=4877 ).  This DataFilter properly sets the control's Value to 0.0055 but the control loses the displayed value. It goes blank! What am I missing?  Even though I have been developing with Infragistics controls for over 10 years, I cannot articulate what a DataFilter is or how to properly use it. Perhaps there is no "built-in" way of doing this and I need to instead use the after exit edit mode event to divide by 100 and manually set the Value to 0.0055 and allow the format string to display 0.55%?  Thank you!

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello James,

    My team and I have done an initial review of this thread, and before I make a recommendation, I would just like to clarify exactly the behavior you are looking to achieve, as an IEditorDataFilter may or may not be necessary depending on exactly what you wish to do.

    At the moment, I am under the impression that the behavior you are looking to achieve is that the value would appear in edit mode as it does when not in edit mode. For example, if you have a percent format set up on the editor, .NET will evaluate this and automatically multiply that value by 100 for display. So, for example, the displayed value in this case will be 0.55%, but in edit mode, you will see 0.0055. I am under the impression that you still wish to see 0.55 in edit mode? Is this the case?

    Please let me know if you have any other questions or concerns on this matter.

Children