Class ColumnModel
Defines the Column model.
Inheritance
Namespace: Syncfusion.Blazor.Grids
Assembly: Syncfusion.Blazor.dll
Syntax
public class ColumnModel : Object
Constructors
ColumnModel()
Declaration
public ColumnModel()
Properties
AllowEditing
If AllowEditing set to false, then it disables editing of a particular column. By default all columns are editable.
Declaration
public bool AllowEditing { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowFiltering
If AllowFiltering set to false, then it disables filtering option and filter bar element of a particular column. By default all columns are filterable.
Declaration
public bool AllowFiltering { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowGrouping
If AllowGrouping set to false, then it disables grouping of a particular column. By default all columns are groupable.
Declaration
public bool AllowGrouping { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowReordering
If AllowReordering set to false, then it disables reorder of a particular column. By default all columns can be reorder.
Declaration
public bool AllowReordering { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowResizing
If AllowResizing set to false, it disables resize option of a particular column.
Declaration
public bool AllowResizing { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowSearching
If AllowSearching set to false, then it disables Searching of a particular column. By default all columns allow Searching.
Declaration
public bool AllowSearching { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowSorting
If AllowSorting set to false, then it disables sorting option of a particular column. By default all columns are sortable.
Declaration
public bool AllowSorting { get; set; }
Property Value
Type |
---|
System.Boolean |
AutoFit
If AutoFit set to true, then the particular column content width will be adjusted based on its content in the initial rendering itself. Setting this property as true is equivalent to calling autoFitColumns method in the dataBound event.
Declaration
public bool AutoFit { get; set; }
Property Value
Type |
---|
System.Boolean |
ClipMode
Defines the cell content's overflow mode.
Declaration
public ClipMode ClipMode { get; set; }
Property Value
Type |
---|
ClipMode |
Columns
Used to render multiple header rows(stacked headers) on the Grid header.
Declaration
public object Columns { get; set; }
Property Value
Type |
---|
System.Object |
Commands
commands provides an option to display command buttons in every cell.
Declaration
public List<CommandModel> Commands { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<CommandModel> |
CustomAttributes
The CSS styles and attributes of the content cells of a particular column can be customized.
Declaration
public object CustomAttributes { get; set; }
Property Value
Type |
---|
System.Object |
DataSource
Defines the column data source which will act as foreign data source.
Declaration
public object DataSource { get; set; }
Property Value
Type |
---|
System.Object |
DefaultValue
Defines default values for the component when adding a new record to the Grid.
Declaration
public object DefaultValue { get; set; }
Property Value
Type |
---|
System.Object |
DisableHtmlEncode
If DisableHtmlEncode is set to true, it encodes the HTML of the header and content cells.
Declaration
public bool DisableHtmlEncode { get; set; }
Property Value
Type |
---|
System.Boolean |
DisplayAsCheckBox
If DisplayAsCheckBox is set to true, it displays the column value as a check box instead of Boolean value.
Declaration
public bool DisplayAsCheckBox { get; set; }
Property Value
Type |
---|
System.Boolean |
Edit
Defines object to customize default edit cell.
Declaration
public object Edit { get; set; }
Property Value
Type |
---|
System.Object |
EditTemplate
Defines the cell edit template that used as editor for a particular column.
Declaration
public string EditTemplate { get; set; }
Property Value
Type |
---|
System.String |
EditType
Defines the type of component for editing.
Declaration
public EditType EditType { get; set; }
Property Value
Type |
---|
EditType |
EnableGroupByFormat
If EnableGroupByFormat set to true, then it groups the particular column by formatted values. By default no columns are group by format.
Declaration
public bool EnableGroupByFormat { get; set; }
Property Value
Type |
---|
System.Boolean |
Field
Defines the field name of column which is mapped with mapping name of DataSource. The bounded columns can be sort, filter and group etc., If the field name contains “dot”, then it is considered as complex binding. the first character must be an alphabet and should not contain spaces and special characters.
Declaration
public string Field { get; set; }
Property Value
Type |
---|
System.String |
Filter
Defines the filter options to customize filtering for the particular column.
Declaration
public object Filter { get; set; }
Property Value
Type |
---|
System.Object |
FilterBarTemplate
The FilterBarTemplate is used to add a custom component instead of default input component for filter bar.
Declaration
public object FilterBarTemplate { get; set; }
Property Value
Type |
---|
System.Object |
FilterTemplate
Defines the filter template/UI that used as filter for a particular column.
Declaration
public string FilterTemplate { get; set; }
Property Value
Type |
---|
System.String |
ForeignKeyField
Defines the mapping column name of the foreign data source. If it is not defined then the columns.field will be considered as mapping column name.
Declaration
public string ForeignKeyField { get; set; }
Property Value
Type |
---|
System.String |
ForeignKeyValue
Defines the display column name from the foreign data source which will be obtained from comparing local and foreign data.
Declaration
public string ForeignKeyValue { get; set; }
Property Value
Type |
---|
System.String |
Format
It is used to change display value with the given format and does not affect the original data.
Declaration
public string Format { get; set; }
Property Value
Type |
---|
System.String |
Formatter
Defines the method which is used to achieve custom formatting from an external function. This function triggers before rendering of each cell.
Declaration
public object Formatter { get; set; }
Property Value
Type |
---|
System.Object |
Freeze
Defines which side the column need to freeze.
Declaration
public FreezeDirection Freeze { get; set; }
Property Value
Type |
---|
FreezeDirection |
HeaderTemplate
Defines the column template which is used to add customized element in the column header.
Declaration
public string HeaderTemplate { get; set; }
Property Value
Type |
---|
System.String |
HeaderText
Defines the header text of column which is used to display in column header. If HeaderText is not defined, then field name value will be assigned to header text.
Declaration
public string HeaderText { get; set; }
Property Value
Type |
---|
System.String |
HeaderTextAlign
Define the alignment of column header which is used to align the text of column header.
Declaration
public TextAlign HeaderTextAlign { get; set; }
Property Value
Type |
---|
TextAlign |
HideAtMedia
Column visibility can change based on its Media Queries. HideAtMedia accepts only valid Media Queries.
Declaration
public string HideAtMedia { get; set; }
Property Value
Type |
---|
System.String |
Index
Gets the unique identifier value of the column. It is used to get the object.
Declaration
public int Index { get; set; }
Property Value
Type |
---|
System.Int32 |
IsFrozen
You can use this property to freeze selected columns in grid.
Declaration
public bool IsFrozen { get; set; }
Property Value
Type |
---|
System.Boolean |
IsIdentity
If IsIdentity is set to true, then this column is considered as identity column.
Declaration
public bool IsIdentity { get; set; }
Property Value
Type |
---|
System.Boolean |
IsPrimaryKey
If IsPrimaryKey is set to true, considers this column as the primary key constraint.
Declaration
public bool IsPrimaryKey { get; set; }
Property Value
Type |
---|
System.Boolean |
LockColumn
Defines the mapping column name of the foreign data source. If it is not defined then the columns.field will be considered as mapping column name.
Declaration
public bool LockColumn { get; set; }
Property Value
Type |
---|
System.Boolean |
MaxWidth
Defines the maximum width of the column in pixel or percentage, which will restrict resizing beyond this pixel or percentage.
Declaration
public object MaxWidth { get; set; }
Property Value
Type |
---|
System.Object |
MinWidth
Defines the minimum width of the column in pixels or percentage.
Declaration
public object MinWidth { get; set; }
Property Value
Type |
---|
System.Object |
ShowColumnMenu
If ShowColumnMenu set to false, then it disable the column menu of a particular column. By default column menu will show for all columns.
Declaration
public bool ShowColumnMenu { get; set; }
Property Value
Type |
---|
System.Boolean |
ShowInColumnChooser
If ShowInColumnChooser set to false, then hides the particular column in column chooser. By default all columns are displayed in column Chooser.
Declaration
public bool ShowInColumnChooser { get; set; }
Property Value
Type |
---|
System.Boolean |
SortComparer
It defines the custom sort comparer function.
Declaration
public object SortComparer { get; set; }
Property Value
Type |
---|
System.Object |
Template
Defines the column template that renders customized element in each cell of the column.
Declaration
public string Template { get; set; }
Property Value
Type |
---|
System.String |
TextAlign
Defines the alignment of the column in both header and content cells.
Declaration
public TextAlign TextAlign { get; set; }
Property Value
Type |
---|
TextAlign |
Type
Defines the data type of the column.
Declaration
public ColumnType Type { get; set; }
Property Value
Type |
---|
ColumnType |
Uid
Gets the unique identifier value of the column. It is used to get the object.
Declaration
public string Uid { get; set; }
Property Value
Type |
---|
System.String |
ValidationRules
Defines rules to validate data before creating and updating.
Declaration
public object ValidationRules { get; set; }
Property Value
Type |
---|
System.Object |
ValueAccessor
Defines the method used to apply custom cell values from external function and display this on each cell rendered.
Declaration
public object ValueAccessor { get; set; }
Property Value
Type |
---|
System.Object |
Visible
If visible is set to false, hides the particular column. By default, all columns are displayed.
Declaration
public bool Visible { get; set; }
Property Value
Type |
---|
System.Boolean |
Width
Defines the width of the column in pixels or percentage.
Declaration
public object Width { get; set; }
Property Value
Type |
---|
System.Object |