$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Data Grid WinForms Control
Create data gird view in C# with modern user interface for your Windows Forms applications
Home > WinForms UI Controls > User Manual > MaskBox Column in C#

C# Grid MaskBox Column

The Kettic Data Grid Control uses the Data Grid Column objects to represent columns. The Kettic Data Grid Column is the base class of all types of grid columns, including the Grid MaskBox Column. The Grid MaskBox Column descends all features of the Kettic Data Grid Column parent class. So the Grid MaskBox Column shares all properties of Data Grid Control class and provides styling and C# events for building entire gird MaskBox column in Windows Forms C# applications.

Add Grid MaskBox Column in C#

The Kettic Grid MaskBox Column is used to edit text data in restricted format. To display the text, we need to set text to the Value property based on the settings of properties, like TextAlignment, WrapText, and FormatString. To add a mask to the grid maskbox column, we can customize the Mask and MaskType properties using the C# code snippet below.

GridMaskBoxColumn maskBoxColumn = new GridMaskBoxColumn();
maskBoxColumn.Name = "Product";
maskBoxColumn.FieldName = "ProductPrice";
maskBoxColumn.HeaderText = "Product Price";
maskBoxColumn.MaskType = MaskType.Numeric;
maskBoxColumn.Mask = "C";
maskBoxColumn.TextAlignment = ContentAlignment.BottomCenter;
maskBoxColumn.FormatString = "{0:C}";
maskBoxColumn.DataType = typeof(decimal);
ketticGrid.MasterTemplate.Columns.Add(maskBoxColumn);
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls