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
435
problem with InputMask
posted

Hi,

I have a UltraMaskedEdit control in a grid cell. The inputmask works fine with all numbers except with 9.

For example, I have to display grid cell content as 00 19 _ _. So the custom input mask is 00 19 ##

But after setting the mask, the grid cell text is displayed as 00 1_ _ _.  This happens only when  9 comes beside # character. I have tried "n" also in the mask. Then also,the same result am getting..

Code looks like this

 

 

 

 

 

 

UltraGridCell 

 

cell = this.ultraGrid1.DisplayLayout.ActiveRow.Cells["Number"];

 

 

Infragistics.Win.UltraWinMaskedEdit.

UltraMaskedEdit textEdit =  new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();

textEdit.EditAs = Infragistics.Win.UltraWinMaskedEdit.EditAsType.UseSpecifiedMask;

textEdit.InputMask = "00 99 ##";

Appreciate a reply in this regard. Thanks!!

Parents
  • 37774
    Verified Answer
    posted

    This happens because '9' is a valid mask character and will be interpreted as such.  You can prevent this from happening by escaping the charater in your mask, i.e.

    this.ultraMaskedEdit1.InputMask = "001\\9##";

    -Matt

Reply Children
No Data