This is a migrated thread and some comments may be shown as answers.

Error tool tip on masked input textbox similar to WPF textbox

2 Answers 243 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Vivek
Top achievements
Rank 2
Vivek asked on 09 May 2013, 12:19 PM
Hi, 

I want the error tool tip on masked text similar to normal WPF textbox. Please find attached images.
I also want the border of the masked input text to be red when an invalid number given as input. 
Could you help me to achieve this? 
I am not sure whether this request raised by anyone but i couldn't find the solution in any of the threads.
Let me know if you need more information on this.

Thanks,
Vivek

2 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 14 May 2013, 10:41 AM
Hello Vivek,

The RadMaskedInput controls have a default ValidationTemplate which can be customized to better fit in your application design. This template is applied through the Validation.ErrorTemplate attached property:
<telerik:RadMaskedNumericInput x:Name="radMaskedNumericInput"
    AllowInvalidValues="True"
    ErrorMessage="{Binding Path=Text,
                            ElementName=customErrorMessage}"
    Validation.ErrorTemplate="{StaticResource TextBoxErrorTemplate}"
    Value="{Binding Path=DoubleValue,
                    Mode=TwoWay,
                    NotifyOnValidationError=True,
                    ValidatesOnExceptions=True}" />

I attached a sample solution demonstrating how to customize the ErrorTemplate of the MaskedNumericInput control to display only a Red border around the control. You can further customize this template to better fit your needs.

Please let us know if you need further assistance.

Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Vivek
Top achievements
Rank 2
answered on 14 May 2013, 11:32 AM
Thanks Tina, that helps. I will let you know if i need any more help.

Regards, Vivek
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Vivek
Top achievements
Rank 2
Answers by
Tina Stancheva
Telerik team
Vivek
Top achievements
Rank 2
Share this question
or