This question is locked. New answers and comments are not allowed.
Hi,
One column which type is GridViewMaskedTextBoxColumn in my Columns of RadGridView, User can input data of three types, string like "22232//abcd", integar like 123, double like 123.00. I user PreparingCellForEdit Event to initialize the EditingElement which is RadMaskedTextBox,
when I input the 200.00 according to the third condition(look the code), the mask of RadMaskedTextbox is "n2", but when I finish editing ,
Kind Regards
Jeremy
One column which type is GridViewMaskedTextBoxColumn in my Columns of RadGridView, User can input data of three types, string like "22232//abcd", integar like 123, double like 123.00. I user PreparingCellForEdit Event to initialize the EditingElement which is RadMaskedTextBox,
private void rgv_PreparingCellForEdit(object sender, GridViewPreparingCellForEditEventArgs e) { if (e.Column.UniqueName == "IsRadMaskedTextBoxColumn") { RadMaskedTextBox tbNumbersArea = e.EditingElement as RadMaskedTextBox; if (e.Row.DataContext != null && e.Row.DataContext is CustSetbihyoItem) { CustSetbihyoItem custItem = e.Row.DataContext as CustSetbihyoItem; if (custItem.Unit == DicUnit[0] || custItem.Unit == DicUnit[2])
{ tbNumbersArea.MaskType = MaskType.Numeric; //Input integer
tbNumbersArea.Mask = "d"; tbNumbersArea.Value = 1; } else if (custItem.Unit == DicUnit[10]) { RwNumberArea RwNumberArea = new RwNumberArea(); //One child window be show
RwNumberArea.ShowDialog(); } else { tbNumbersArea.MaskType = MaskType.Numeric; // Input Double
tbNumbersArea.Mask = "n2"; tbNumbersArea.Value = Menseki; //the default is 100.00
} } }
}it displays 200, I need 200.00, how to solve it ? Kind Regards
Jeremy