Data Grid WinForms Control Create data gird view in C# with modern user interface for your Windows Forms applications C# Grid TextBox 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 Text Box Column. The Grid Text Box Column descends all features of the Kettic Data Grid Column parent class. So the Grid TextBox Column shares all properties of Data Grid Column class. Generate Grid Text Box Column in C#
The Kettic Grid CheckBox Column is able to edit and display the text data. Users of the Grid Control is able to display text of data in the cell in grid text box column by set text to the Value property and align the text in the cell by configure the TextAlignment property and WrapText property. Another FormatString property is used to format the text that are displayed in the cells in column. Edit Cells of Grid Text Box Column
If we want to edit the cells of a grid text box column, we need to use a textbox editor to handle the input of users and uses the MaximumLength property to restrict the length of text that the user can input to a cell. GridTextBoxColumn textBoxColumn = new GridTextBoxColumn(); textBoxColumn.Name = "Text Box Column"; textBoxColumn.HeaderText = "Food List"; textBoxColumn.FieldName = "Food Name"; textBoxColumn.MaximumLength = 70; textBoxColumn.TextAlignment = ContentAlignment.BottomCenter; ketticGrid.MasterTemplate.Columns.Add(textBoxColumn);
|