Completed
Last Updated: 11 Mar 2013 09:01 by ADMIN
ADMIN
Stefan
Created on: 11 Mar 2013 09:01
Category: GridView
Type: Bug Report
1
FIX. RadGridView - the MaxLength property of the GridViewMaskBoxColumn is not taken into consideration
To reproduce: GridViewMaskBoxColumn maskBoxColumn = new GridViewMaskBoxColumn(); maskBoxColumn.Name = "MaskEditBoxColumn"; maskBoxColumn.HeaderText = "MaskEditBoxColumn"; maskBoxColumn.MaxLength = 5; maskBoxColumn.MaskType = MaskType.Numeric; maskBoxColumn.Mask = "C"; maskBoxColumn.FormatString = "{0:C}"; radGridView1.MasterTemplate.Columns.Add(maskBoxColumn); WORKAROUND: void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e) { GridSpinEditor editor = e.ActiveEditor as GridSpinEditor; if (editor != null) { GridSpinEditorElement element = (GridSpinEditorElement)editor.EditorElement; element.TextChanging += element_TextChanging; } } void element_TextChanging(object sender, TextChangingEventArgs e) { e.Cancel = e.NewValue.Length > 5; }
Comment : Removed the MaxLength property from GridViewMaskBoxColumn. You should use the Mask property and set an appropriate mask value. For example the #### mask allows entering only 4 digits.
0 comments