开发者

Positive Currency Values In WPF Telerik RadMaskTextBox Of Currency Mask

I am using a W开发者_运维技巧PF Telerik RadMaskTextBox of Currency Mask in my application, but the problem is that I am able to enter negative currencies in this radmasktextbox. Is there a way, such that we can restrict the user to enter only positive values? If so, how?

Thanx.


I think you'll get better answers if you ask this question in their forum . but anyway I was looking for the answer and I found a similar question however it's for their ASP controls but I think WPF should be the same . http://www.telerik.com/community/forums/aspnet/input/numerictextbox-justinput-positive-integers.aspx


Maybe Validation?
One of the advantages to use elements from telerik is the easy way of throwing validation exceptions by wrong inputs from the user. Also, if you have a save-method or whatever, you can prove if there are still exceptions from the user.

Here is a link that maybe helps you:
Throwing Validation Exceptions
(There are many more validation tutorials for other elements)

Or....
But you can also just write this:

<telerik:RadMaskedCurrencyInput maskedInput:MaskedInputExtensions.Minimum="0" />

(For more Infos: Only Positive Inputs )

Ps.: I know, just give you a bunch of links is not the best way, but I cound't explane it better than written on this pages.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜