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
2349
MaskInput on Column
posted

Check out the following code and tell me why, when I backspace so that nothing is left in the editor that I have NO value in the editor.  I would like for the value to default to zero when someone backspaces out all characters...

 

            col.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.IntegerNonNegative;
            col.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
            col.DefaultCellValue = 0;
            col.MinValue = 0;
            col.MaxValue = 999999;
            col.MaskInput = "nnnnnn";
            col.Format = "0";
            col.MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiterals;

Parents
  • 469350
    Offline posted

     Nothing in the code here would have any effect on what happens when the user deletes all of the text. I think you would probably have to handle CellChange (and somehow prevent recursion) or maybe use the Key events to limit what the user can type. You will not be able to acheive this with any property setting that I am aware of. 

Reply Children
No Data