Class Column
Gets or sets an object that indicates to render the grid with specified columns.
Inherited Members
Namespace: Syncfusion.JavaScript.Models
Assembly: Syncfusion.EJ.dll
Syntax
public class Column : EJTagHelper
Constructors
Column()
Gets or sets an object that indicates to render the grid with specified columns
Declaration
public Column()
Properties
AllowEditing
Gets or sets a value that indicates whether to enable editing behavior for particular column.
Declaration
[JsonProperty("allowEditing")]
public bool AllowEditing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AllowFiltering
Gets or sets a value that indicates whether to enable dynamic filtering behavior for particular column.
Declaration
[JsonProperty("allowFiltering")]
public bool AllowFiltering { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AllowGrouping
Gets or sets a value that indicates whether to enable dynamic grouping behavior for particular column.
Declaration
[JsonProperty("allowGrouping")]
public bool AllowGrouping { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AllowResizing
Gets or sets a value that indicates whether to enable dynamic resizable for particular column.
Declaration
[JsonProperty("allowResizing")]
public bool AllowResizing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AllowSorting
Gets or sets a value that indicates whether to enable dynamic sorting behavior for particular column.
Declaration
[JsonProperty("allowSorting")]
public bool AllowSorting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AllowTextWrap
Gets or sets a value that indicates whether to enable textwrap behavior for particular column.
Declaration
[JsonProperty("allowTextWrap")]
public bool AllowTextWrap { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ClipMode
Sets the clip mode for Grid cell as ellipsis or clipped content(both header and content).
Declaration
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("clipMode")]
public ClipMode ClipMode { get; set; }
Property Value
Type | Description |
---|---|
ClipMode |
Command
Gets or sets an object that indicates to define a command column in the grid.
Declaration
public List<Commands> Command { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Commands> |
Commands
Gets or sets an object that indicates to define a command column in the grid.
Declaration
[JsonProperty("commands")]
public List<Commands> Commands { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Commands> |
CssClass
Gets or sets a value that indicates to provide custom CSS for an individual column.
Declaration
[JsonProperty("cssClass")]
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CustomAttribute
Gets or sets a value that indicates the attribute values to the td element of a particular column.
Declaration
public List<KeyValue> CustomAttribute { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<KeyValue> |
CustomAttributes
Gets or sets a value that indicates the attribute values to the td element of a particular column.
Declaration
[JsonProperty("customAttributes")]
public Dictionary<string, object> CustomAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
DataManager
Gets or sets the data to render the grid with records.
Declaration
[JsonConverter(typeof(DataManagerConverter))]
[JsonProperty("dataSource")]
[HtmlAttributeName("datasource")]
public DataSource DataManager { get; set; }
Property Value
Type | Description |
---|---|
DataSource |
DataSource
Gets or sets a value that indicates to bind the external datasource to the particular column when column editType as dropdownedit and also it is used to bind the datasource to the foreign key column while editing the grid. //Where data is array of JSON objects of text and value for the drop-down and array of JSON objects for foreign key column.
Declaration
[HtmlAttributeName("datasource")]
[JsonConverter(typeof(DataManagerConverter))]
[JsonProperty("dataSource")]
public object DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
DataType
Gets or sets a value that indicates the data type for particular column.
Declaration
[JsonProperty("type")]
[HtmlAttributeName("type")]
public string DataType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DateEditOptions
Gets or sets a value that indicates to customize ejDatePicker of an editable column.
Declaration
[JsonProperty("editParams")]
public DatePickerProperties DateEditOptions { get; set; }
Property Value
Type | Description |
---|---|
DatePickerProperties |
DateTimeEditOptions
Gets or sets a value that indicates to customize ejDateTimePicker of an editable column.
Declaration
[JsonProperty("editParams")]
public DateTimePickerProperties DateTimeEditOptions { get; set; }
Property Value
Type | Description |
---|---|
DateTimePickerProperties |
DefaultValue
Gets or sets a value that indicates to display the specified default value while adding a new record to the grid.
Declaration
[JsonProperty("defaultValue")]
public object DefaultValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
DisableHtmlEncode
Gets or sets a value that indicates to render the grid content and header with an HTML elements.
Declaration
[JsonProperty("disableHtmlEncode")]
public bool DisableHtmlEncode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DisplayAsCheckbox
Gets or sets a value that indicates to display a column value as checkbox or string.
Declaration
[JsonProperty("displayAsCheckbox")]
public bool DisplayAsCheckbox { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DropDownEditOptions
Gets or sets a value that indicates to customize ejDropwDownList of an editable column.
Declaration
[JsonProperty("editParams")]
public DropDownListProperties DropDownEditOptions { get; set; }
Property Value
Type | Description |
---|---|
DropDownListProperties |
EditTemplate
Gets or sets a template that displays a custom editor used to edit column values.
Declaration
[JsonProperty("editTemplate")]
public EditTemplate EditTemplate { get; set; }
Property Value
Type | Description |
---|---|
EditTemplate |
EditType
Gets or sets a value that indicates to render the element(based on edit type) for editing the grid record.
Declaration
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("editType")]
public EditingType EditType { get; set; }
Property Value
Type | Description |
---|---|
EditingType |
EnableGroupByFormat
Gets or sets a value that indicates whether to group the column based on given format for particular column.
Declaration
[JsonProperty("enableGroupByFormat")]
public bool EnableGroupByFormat { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Field
Gets or sets a value that indicates to display the columns in the grid mapping with column name of the dataSource.
Declaration
[JsonProperty("field")]
public string Field { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FilterBarTemplate
Gets or sets a template that displays a custom filter used to filter the column values.
Declaration
[JsonProperty("filterBarTemplate")]
public FilterBarTemplate FilterBarTemplate { get; set; }
Property Value
Type | Description |
---|---|
FilterBarTemplate |
FilterOperator
This specifies the grid columns to show the filterOperator to the grid records.
Declaration
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("filterOperator")]
public FilterOperatorType? FilterOperator { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<FilterOperatorType> |
FilterType
This specifies the grid to show the filterBar or filterMenu to the grid records.
Declaration
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("filterType")]
public FilterOption? FilterType { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<FilterOption> |
ForeignKeyField
Gets or sets a value that indicates to define foreign key field name of the grid datasource.
Declaration
[JsonProperty("foreignKeyField")]
public string ForeignKeyField { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ForeignKeyValue
Gets or sets a value that indicates to bind the field which is in foreign column datasource based on the foreignKeyField.
Declaration
[JsonProperty("foreignKeyValue")]
public string ForeignKeyValue { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Format
Gets or sets a value that indicates the format for the text applied on the column.
Declaration
[JsonProperty("format")]
public string Format { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HeaderTemplateID
Gets or sets a value that indicates to add the template within the header element of the particular column.
Declaration
[JsonProperty("headerTemplateID")]
public string HeaderTemplateID { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HeaderText
Gets or sets a value that indicates to display the title of that particular column.
Declaration
[JsonProperty("headerText")]
public string HeaderText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HeaderTextAlign
This defines the text alignment of a particular column header cell value.
Declaration
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("headerTextAlign")]
public TextAlign? HeaderTextAlign { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<TextAlign> |
HeaderTooltip
Declaration
[JsonProperty("headerTooltip")]
public string HeaderTooltip { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsFrozen
You can use this property to freeze selected columns in grid at the time of scrolling.
Declaration
[JsonProperty("isFrozen")]
public bool IsFrozen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsIdentity
Gets or sets a value that indicates the column has an identity in the database.
Declaration
[JsonProperty("isIdentity")]
public bool IsIdentity { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsPrimaryKey
Gets or sets a value that indicates the column is act as a primary key(read-only) of the grid. The editing is performed based on the primary key column.
Declaration
[JsonProperty("isPrimaryKey")]
public bool IsPrimaryKey { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsUnbound
Gets or sets a value that indicates to add the command column button. See unboundType
Declaration
[Obsolete("IsUnbound property has been deprecated.")]
[JsonProperty("isUnbound")]
public bool IsUnbound { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
NumericEditOptions
Gets or sets a value that indicates to customize ejNumericTextbox of an editable column.
Declaration
[JsonProperty("editParams")]
public EditorProperties NumericEditOptions { get; set; }
Property Value
Type | Description |
---|---|
EditorProperties |
Priority
Gets or sets a value that indicates to display the columns with priority in the grid.
Declaration
[JsonProperty("priority")]
public int Priority { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ServerType
Gets or sets a value to filter the numeric text box value with data types.
Declaration
[JsonProperty("serverType")]
public string ServerType { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ShowInColumnChooser
Used to hide the particular column in column chooser by giving value as false.
Declaration
[JsonProperty("showInColumnChooser")]
public bool ShowInColumnChooser { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Template
Gets or sets a value that indicates whether to enables column template for a particular column.
Declaration
[JsonProperty("template")]
public string Template { get; set; }
Property Value
Type | Description |
---|---|
System.String |
TemplateID
Declaration
[Obsolete("TemplateID property has been deprecated. Use Template property instead")]
[JsonProperty("templateID")]
public string TemplateID { get; set; }
Property Value
Type | Description |
---|---|
System.String |
TextAlign
This defines the text alignment of a particular column cell value.
Declaration
[JsonProperty("textAlign")]
[JsonConverter(typeof(StringEnumConverter))]
public TextAlign TextAlign { get; set; }
Property Value
Type | Description |
---|---|
TextAlign |
Tooltip
Sets the template for Tooltip in Grid Columns(both header and content).
Declaration
[JsonProperty("tooltip")]
public string Tooltip { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Type
Gets or sets a value that indicates to specify the data type of the specified columns.
Declaration
[JsonProperty("type")]
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ValidationRule
Gets or sets a value that indicates to define constraints for saving data to the database.
Declaration
public List<KeyValue> ValidationRule { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<KeyValue> |
ValidationRules
Gets or sets a value that indicates to define constraints for saving data to the database.
Declaration
[JsonProperty("validationRules")]
public Dictionary<string, object> ValidationRules { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
Visible
Gets or sets a value that indicates whether this column is visible in the grid.
Declaration
[JsonProperty("visible")]
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Width
Gets or sets a value that indicates to define the width for a particular column in the grid.
Declaration
[JsonProperty("width")]
public object Width { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
ShouldSerializeCommands()
Gets or sets a value that indicates whether the command column should serialize.
Declaration
public bool ShouldSerializeCommands()
Returns
Type | Description |
---|---|
System.Boolean | It returns the Boolean |
ShouldSerializeCustomAttributes()
Gets or sets a value that indicates whether the custom attributes should serialize.
Declaration
public bool ShouldSerializeCustomAttributes()
Returns
Type | Description |
---|---|
System.Boolean | It returns the Boolean |
ShouldSerializeValidationRules()
Gets or sets a value that indicates whether the validation rules should serialize.
Declaration
public bool ShouldSerializeValidationRules()
Returns
Type | Description |
---|---|
System.Boolean | It returns the Boolean |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |