Class ColumnBuilder
Inheritance
System.Object
Syncfusion.EJ2.ControlBuilder
ColumnBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class ColumnBuilder : ControlBuilder
Constructors
ColumnBuilder()
Declaration
ColumnBuilder(List<Column>)
Declaration
public ColumnBuilder(List<Column> collection)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<Column> |
collection |
|
Methods
Add()
Declaration
CustomAttributes(Object)
The CSS styles and attributes of the content cells of a particular column can be customized.
Declaration
public ColumnBuilder CustomAttributes(object customAttributes)
Parameters
Type |
Name |
Description |
System.Object |
customAttributes |
|
Returns
DisplayAsCheckBox(Boolean)
If displayAsCheckBox
is set to true, it displays the column value as a check box instead of Boolean value.
Declaration
public ColumnBuilder DisplayAsCheckBox(bool displayAsCheckBox)
Parameters
Type |
Name |
Description |
System.Boolean |
displayAsCheckBox |
|
Returns
Field(String)
Defines the name of the field whose data will be displayed in the column.
Declaration
public ColumnBuilder Field(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
It is used to change display value with the given format and does not affect the original data.
Gets the format from the user which can be standard or custom number
and date
formats.
Declaration
public ColumnBuilder Format(string format)
Parameters
Type |
Name |
Description |
System.String |
format |
|
Returns
Header(String)
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 ColumnBuilder Header(string header)
Parameters
Type |
Name |
Description |
System.String |
header |
|
Returns
HeaderTemplate(String)
Defines the column template as string or HTML element ID which is used to add customized element in the column header.
Declaration
public ColumnBuilder HeaderTemplate(string headerTemplate)
Parameters
Type |
Name |
Description |
System.String |
headerTemplate |
|
Returns
Template(String)
Defines the column template that renders customized element in each cell of the column.
It accepts either template or HTML element ID.
Declaration
public ColumnBuilder Template(string template)
Parameters
Type |
Name |
Description |
System.String |
template |
|
Returns
TextAlign(TextAlign)
Defines the alignment of the column in both header and content cells.
Declaration
public ColumnBuilder TextAlign(TextAlign textAlign)
Parameters
Returns
Width(Double)
Defines the width of the column in pixels or percentage.
Declaration
public ColumnBuilder Width(double width)
Parameters
Type |
Name |
Description |
System.Double |
width |
|
Returns
Width(String)
Defines the width of the column in pixels or percentage.
Declaration
public ColumnBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns