TextColumnBase Class
A base class for columns used to display and edit text values.
Namespace: DevExpress.Maui.DataGrid
Assembly: DevExpress.Maui.DataGrid.dll
NuGet Package: DevExpress.Maui.DataGrid
Declaration
public abstract class TextColumnBase :
GridColumn
Remarks
The TextColumnBase
is a base class for columns in the DataGridView that allow users to edit String values. In the figure below, the Full Name column is a TextColumn, which is a TextColumnBase
descendant.
Options
You can configure the following options related to text columns:
- PlaceholderText — specifies the input prompt. This string is displayed greyed out when a user focuses a cell that does not contain a value.
- FontFamily, FontSize, FontAttributes, TextDecorations, FontColor — specify the font face, size, bold and italic attributes, underline and strike-through decorations, and color.
You can configure the following options related to all types of grid columns:
- FieldName — specifies the name of the data source’s field associated with the grid column, or serves as an identifier for an unbound column.
- Caption — specifies the caption displayed in the column header.
- DisplayFormat — specifies the pattern used to format values in the column’s cells.
- HorizontalContentAlignment, VerticalContentAlignment — specify the horizontal and vertical alignment of the column’s content.
- MinWidth, MaxWidth, Width — specify the column’s minimum, maximum, and actual widths.
- IsVisible — specifies whether the column is visible in the grid.
Use the following properties to sort and group data in the grid, and calculate cell values based on expressions:
- AllowSort, SortOrder, SortIndex, SortMode — to sort data.
- IsGrouped, GroupInterval, GroupCaptionDisplayFormat — to group data.
- UnboundExpression, UnboundType — to calculate values in columns that are not bound to a data source.
The grid stores columns in the DataGridView.Columns collection. Depending on the AutoGenerateColumnsMode option, the grid automatically generates columns based on the bound data source, or you can add columns to the grid and associate them with data fields manually. See the following help topic for an example: Create Columns for Different Data Types.