Monsalma Data Grid for .NET MAUI – Columns
Published:
Modified:
Column Types
DataGridColumn
DataGridColumn is the base column class. All other column classes inherit it. It is abstract – it cannot be instantiated.
Properties:
Width(separate article)MinWidthMaxWidthDataBindingHeaderTextCellIsReadOnlyBindingCellHeaderStyleCellStyleCellEditStyle
DataGridColumnText
DataGridColumnText contains a Label.
Label style is controlled by properties inherited from DataGridColumn: , CellHeaderStyleCellStyle and CellEditStyle. Background and foreground colors are inherited from corresponding DataGrid style properties (HeaderRowStyle, RegularOddRowStyle, RegularEvenRowStyle and SelectedRowStyle).
DataBinding property is used to generate label content.
HeaderText defines the content of the corresponding header cell.
DataGridColumnTemplated
DataGridColumnTemplated defines a column with templated content. Two templates can be set: the regular (read-only) template and edit template. The corresponding bindable properties are CellTemplate and CellEditTemplate.
DataGridColumnCommand
DataGridColumnCommand is a column whose cells contain a Button control.
To have all cells (buttons) across all rows with identical text content, use CommandText bindable property. Otherwise, use DataBinding.
Use Command and CommandParameter to define the command to be executed.
