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
20
UltraWinGrid TO REMOVE UNDERSCORE PLACEHOLDER INDICATING NUMBER OF DIGITS TO BE ENTERED
posted

Hi Everyone, Is anybody knows how to turn off underscore placeholder in front of the number in the cell for example _____2345 , the underscore in front indicates how many more digits could be entered . I try to use  Style features PromptChar = ' ' and PadChar = ' ' , no luck so far , any help will be appreciated .

I am using Infragistics4.Win.UltraWinGrid.v14.1  here is doc link http://help.infragistics.com/doc/WinForms/2014.1/CLR4.0/

Thank you Boris 

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Boris,

    PromptChar = ' ' is the correct way. Notice that I am setting it to a single space character, not an empty char/string. I also tried (char)0 and that worked, as well.

    In your example, here, it looks like you are just entering integers. Is that the case? Or did you just not list the decimal point because it's not relevant to the issue? If you are just editing integer values, anyway, then maybe a better solution would be not to use a Mask at all. After all, what is the Mask giving you? All it really does it limit the length of the string, and you could just as easily do that by setting MaxLength on the column. It also prevents the user from typing in a letter or other non-numeric character, but you could validate this in a number of other ways, like handling the BeforeExitEditMode or BeforeCellUpdate event and doing validation there.

Children
No Data