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

PromptChar as empty char

4 Answers 131 Views
MaskedEditBox
This is a migrated thread and some comments may be shown as answers.
Tomislav
Top achievements
Rank 1
Tomislav asked on 23 Oct 2019, 09:32 AM

Can you explain why you forbid the empty char ?
As far as i can see you can set it in the exposed child element (maskEditBoxElement) and it is handled correctly if set as empty.
I need it as empty, so i'm wondering if i'll run into problems that i currently can not see.

public char PromptChar
{
  get
  {
    return this.maskEditBoxElement.PromptChar;
  }
  set
  {
    if (value == char.MinValue)
      throw new ArgumentException("Specified Character is not valid for this property!");
    this.maskEditBoxElement.PromptChar = value;
  }
}

4 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 23 Oct 2019, 10:12 AM

Hello Tomislav,

You can control this with the TextMaskFormat property if you set it to ExcludePromptAndLiterals you would not have the prompt char in the value. Detailed information is available here: TextMaskFormat Property.

Let me know how this works for your case.

Regards,
Dimitar
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Tomislav
Top achievements
Rank 1
answered on 23 Oct 2019, 10:42 AM

Hey Dimitar,

I did that and it's ok for the Value property, but i don't want the prompt characters to be visible to the user (Text property).

It works ok with setting the null char to the child element but i'm asking to see if i'll have problem with doing it.

 

0
Dimitar
Telerik team
answered on 23 Oct 2019, 11:35 AM

Hi Tomislav,

It is not ok to set it on the child element, because at some point you may not be able to type in the text box. If you do not want to see the prompt char, set it to a single space.

Let me know how this works for you. 

Regards,
Dimitar
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Tomislav
Top achievements
Rank 1
answered on 23 Oct 2019, 11:48 AM
tnx
Tags
MaskedEditBox
Asked by
Tomislav
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Tomislav
Top achievements
Rank 1
Share this question
or