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
290
XamTextEditor has'nt same ValidationBahvior than XamMaskedInputEditor
posted

Hello,

I'm trying to implement the validation on some of my Xamgrid fields, I am using the INotifyDataErrorInfo on the objects that needs to be validated.

When I use a XamMaskedInput as the editor for my data (a simpel string) the Validation Tooltip is correctly shown :

But I do not need a XammaskedInput in this field, so I decided to pu a simple XamtextEditor and the tooltip doesn't show up anymore (but the border of the control remains red) :

How can I manage to get the same bahavior than the XamMaskedInput ??

Thanks

Parents
  • 34430
    Offline posted

    Hello PEO-Stokomani,

    Thank you for your post!

    The XamMaskedInput and the XamTextEditor do not have the same error validation behavior by default, as they are from two different families of controls - Shared Inputs and WPF Specific Editors. Being that you are using the XamGrid, I would recommend that you continue with the XamMaskedInput, as it is essentially the text editor of the Shared Inputs family of controls. The difficulty that you may face here is that the XamGrid is a Shared control, which means it has shared functionality between WPF and Silverlight, but the XamTextEditor is a WPF specific control. If you are looking to have your XamGrid work in Silverlight as well as WPF, you will not be able to use the XamTextEditor in this way. It is for this reason, and the reason that the inputs were meant for the XamGrid, whereas the editors were meant for the XamDataGrid, that I would recommend continuing with the XamMaskedInput in your XamGrid.

    If, however the above is not an option for you, I would recommend going into the default style for the XamGrid, which is commonly found here: C:\Program Files (x86)\Infragistics\2015.1\WPF\DefaultStyles\XamGrid\generic.shared.xaml. In that XAML file, you will find a ControlTemplate that targets ToolTip. The x:Key of this ControlTemplate is "CommonValidationToolTipTemplate." This is what you will need to apply to your XamTextEditor.ToolTip property to get the red validation tooltip in the XamGrid.

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

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

Reply Children