RadMaskedText.Text property is not accepting value

On redirect, I tried to reassign RadMaskText.Text value, and it refused to assign the text.
The reason is that this control sets MaskParts internally based on a mask that a developer set in design time.

And when I assign a text, it rejects the text because MaskParts are already reaches to the max.
So what you need to do is clear the MaskParts first. Then assign the text. It will work.

1. rmTxt.Text = "abc" -> rmTxt.Text will have ""
2. rmTxt.Text = "" Then rmTtxt.Text = "abc" -> still rmtxt.Text will have ""
3. rmTxt.MaskParts.Clear(); rmTxt.Text = "abc" -> Now we have "abc" in the rmText.Text.

Comments

Popular Posts