Class TreeGridColumnBuilder
Inheritance
System.Object
Syncfusion.EJ2.ControlBuilder
TreeGridColumnBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class TreeGridColumnBuilder : ControlBuilder
Constructors
TreeGridColumnBuilder()
Declaration
public TreeGridColumnBuilder()
TreeGridColumnBuilder(List<TreeGridColumn>)
Declaration
public TreeGridColumnBuilder(List<TreeGridColumn> collection)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<TreeGridColumn> |
collection |
|
Methods
Add()
Declaration
AllowEditing(Boolean)
If allowEditing
set to false, then it disables editing of a particular column.
By default all columns are editable.
Declaration
public TreeGridColumnBuilder AllowEditing(bool allowEditing)
Parameters
Type |
Name |
Description |
System.Boolean |
allowEditing |
|
Returns
AllowFiltering(Boolean)
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 TreeGridColumnBuilder AllowFiltering(bool allowFiltering)
Parameters
Type |
Name |
Description |
System.Boolean |
allowFiltering |
|
Returns
AllowReordering(Boolean)
If allowReordering
set to false, then it disables reorder of a particular column.
By default all columns can be reorder.
Declaration
public TreeGridColumnBuilder AllowReordering(bool allowReordering)
Parameters
Type |
Name |
Description |
System.Boolean |
allowReordering |
|
Returns
AllowResizing(Boolean)
If allowResizing
set to false, it disables resize option of a particular column.
Declaration
public TreeGridColumnBuilder AllowResizing(bool allowResizing)
Parameters
Type |
Name |
Description |
System.Boolean |
allowResizing |
|
Returns
AllowSorting(Boolean)
If allowSorting
set to false, then it disables sorting option of a particular column.
By default all columns are sortable.
Declaration
public TreeGridColumnBuilder AllowSorting(bool allowSorting)
Parameters
Type |
Name |
Description |
System.Boolean |
allowSorting |
|
Returns
ClipMode(ClipMode)
Defines the cell content's overflow mode. The available modes are
also it will display tooltip while hover on ellipsis applied cell.
Declaration
public TreeGridColumnBuilder ClipMode(ClipMode clipMode)
Parameters
Returns
Columns(Action<TreeGridStackedColumnBuilder>)
Declaration
public TreeGridColumnBuilder Columns(Action<TreeGridStackedColumnBuilder> columns)
Parameters
Returns
Columns(List<TreeGridStackedColumn>)
Declaration
public TreeGridColumnBuilder Columns(List<TreeGridStackedColumn> columns)
Parameters
Returns
Columns(Object)
Declaration
public TreeGridColumnBuilder Columns(object columns)
Parameters
Type |
Name |
Description |
System.Object |
columns |
|
Returns
Columns(String[])
Declaration
public TreeGridColumnBuilder Columns(string[] columns)
Parameters
Type |
Name |
Description |
System.String[] |
columns |
|
Returns
Commands(Object)
commands
provides an option to display command buttons in every cell.
The available built-in command buttons are
Edit - Edit the record.
Delete - Delete the record.
Save - Save the record.
Cancel - Cancel the edit state.
Declaration
public TreeGridColumnBuilder Commands(object commands)
Parameters
Type |
Name |
Description |
System.Object |
commands |
|
Returns
CustomAttributes(Object)
The CSS styles and attributes of the content cells of a particular column can be customized.
Declaration
public TreeGridColumnBuilder CustomAttributes(object customAttributes)
Parameters
Type |
Name |
Description |
System.Object |
customAttributes |
|
Returns
DefaultValue(String)
Defines default values for the component when adding a new record to the TreeGrid.
Declaration
public TreeGridColumnBuilder DefaultValue(string defaultValue)
Parameters
Type |
Name |
Description |
System.String |
defaultValue |
|
Returns
DisableHtmlEncode(Boolean)
If disableHtmlEncode
is set to true, it encodes the HTML of the header and content cells.
Declaration
public TreeGridColumnBuilder DisableHtmlEncode(bool disableHtmlEncode)
Parameters
Type |
Name |
Description |
System.Boolean |
disableHtmlEncode |
|
Returns
DisplayAsCheckBox(Boolean)
If displayAsCheckBox
is set to true, it displays the column value as a check box instead of Boolean value.
Declaration
public TreeGridColumnBuilder DisplayAsCheckBox(bool displayAsCheckBox)
Parameters
Type |
Name |
Description |
System.Boolean |
displayAsCheckBox |
|
Returns
Edit(Object)
Defines the IEditCell
object to customize default edit cell.
Declaration
public TreeGridColumnBuilder Edit(object edit)
Parameters
Type |
Name |
Description |
System.Object |
edit |
|
Returns
EditType(String)
Defines the type of component for editing.
Declaration
public TreeGridColumnBuilder EditType(string editType)
Parameters
Type |
Name |
Description |
System.String |
editType |
|
Returns
Field(String)
Defines the field name of column which is mapped with mapping name of DataSource.
The bounded columns can be sort, filter etc.,
The field
name must be a valid JavaScript identifier,
the first character must be an alphabet and should not contain spaces and special characters.
Declaration
public TreeGridColumnBuilder Field(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Filter(Object)
Defines the filter options to customize filtering for the particular column.
Declaration
public TreeGridColumnBuilder Filter(object filter)
Parameters
Type |
Name |
Description |
System.Object |
filter |
|
Returns
FilterBarTemplate(Object)
The filterBarTemplate
is used to add a custom component instead of default input component for filter bar.
It have create and read functions.
create: It is used for creating custom components.
read: It is used to perform custom filter action.
Declaration
public TreeGridColumnBuilder FilterBarTemplate(object filterBarTemplate)
Parameters
Type |
Name |
Description |
System.Object |
filterBarTemplate |
|
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 TreeGridColumnBuilder Format(string format)
Parameters
Type |
Name |
Description |
System.String |
format |
|
Returns
Defines the method which is used to achieve custom formatting from an external function.
This function triggers before rendering of each cell.
Declaration
public TreeGridColumnBuilder Formatter(object formatter)
Parameters
Type |
Name |
Description |
System.Object |
formatter |
|
Returns
Freeze(FreezeDirection)
Defines which side the column need to freeze
Declaration
public TreeGridColumnBuilder Freeze(FreezeDirection freeze)
Parameters
Returns
HeaderTemplate(String)
Defines the header template as string or HTML element ID which is used to add customized element in the column header.
Declaration
public TreeGridColumnBuilder HeaderTemplate(string headerTemplate)
Parameters
Type |
Name |
Description |
System.String |
headerTemplate |
|
Returns
HeaderText(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 TreeGridColumnBuilder HeaderText(string headerText)
Parameters
Type |
Name |
Description |
System.String |
headerText |
|
Returns
HeaderTextAlign(TextAlign)
Define the alignment of column header which is used to align the text of column header.
Declaration
public TreeGridColumnBuilder HeaderTextAlign(TextAlign headerTextAlign)
Parameters
Type |
Name |
Description |
TextAlign |
headerTextAlign |
|
Returns
Column visibility can change based on Media Queries
.
hideAtMedia
accepts only valid Media Queries.
Declaration
public TreeGridColumnBuilder HideAtMedia(string hideAtMedia)
Parameters
Type |
Name |
Description |
System.String |
hideAtMedia |
|
Returns
IsFrozen(Boolean)
You can use this property to freeze selected columns in grid.
Declaration
public TreeGridColumnBuilder IsFrozen(bool isFrozen)
Parameters
Type |
Name |
Description |
System.Boolean |
isFrozen |
|
Returns
IsIdentity(Boolean)
If isIdentity
is set to true, then this column is considered as identity column.
Declaration
public TreeGridColumnBuilder IsIdentity(bool isIdentity)
Parameters
Type |
Name |
Description |
System.Boolean |
isIdentity |
|
Returns
IsPrimaryKey(Boolean)
If isPrimaryKey
is set to true, considers this column as the primary key constraint.
Declaration
public TreeGridColumnBuilder IsPrimaryKey(bool isPrimaryKey)
Parameters
Type |
Name |
Description |
System.Boolean |
isPrimaryKey |
|
Returns
LockColumn(Boolean)
If lockColumn
set to true, then it disables Reordering of a particular column.
The locked column will be moved to first position.
Declaration
public TreeGridColumnBuilder LockColumn(bool lockColumn)
Parameters
Type |
Name |
Description |
System.Boolean |
lockColumn |
|
Returns
MaxWidth(Double)
Defines the maximum width of the column in pixels or percentage, which will restrict resizing beyond this pixels or percentage.
Declaration
public TreeGridColumnBuilder MaxWidth(double maxWidth)
Parameters
Type |
Name |
Description |
System.Double |
maxWidth |
|
Returns
MaxWidth(String)
Defines the maximum width of the column in pixels or percentage, which will restrict resizing beyond this pixels or percentage.
Declaration
public TreeGridColumnBuilder MaxWidth(string maxWidth)
Parameters
Type |
Name |
Description |
System.String |
maxWidth |
|
Returns
MinWidth(Double)
Defines the minimum width of the column in pixels or percentage.
Declaration
public TreeGridColumnBuilder MinWidth(double minWidth)
Parameters
Type |
Name |
Description |
System.Double |
minWidth |
|
Returns
MinWidth(String)
Defines the minimum width of the column in pixels or percentage.
Declaration
public TreeGridColumnBuilder MinWidth(string minWidth)
Parameters
Type |
Name |
Description |
System.String |
minWidth |
|
Returns
ShowCheckbox(Boolean)
If showCheckbox
set to true, then the checkboxes will be displayed in particular column.
Declaration
public TreeGridColumnBuilder ShowCheckbox(bool showCheckbox)
Parameters
Type |
Name |
Description |
System.Boolean |
showCheckbox |
|
Returns
ShowColumnMenu(Boolean)
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 TreeGridColumnBuilder ShowColumnMenu(bool showColumnMenu)
Parameters
Type |
Name |
Description |
System.Boolean |
showColumnMenu |
|
Returns
ShowInColumnChooser(Boolean)
If showInColumnChooser
set to false, then hide the particular column in column chooser.
By default all columns are displayed in column Chooser.
Declaration
public TreeGridColumnBuilder ShowInColumnChooser(bool showInColumnChooser)
Parameters
Type |
Name |
Description |
System.Boolean |
showInColumnChooser |
|
Returns
SortComparer(Object)
Defines the sort comparer property.
Declaration
public TreeGridColumnBuilder SortComparer(object sortComparer)
Parameters
Type |
Name |
Description |
System.Object |
sortComparer |
|
Returns
SortComparer(String)
Defines the sort comparer property.
Declaration
public TreeGridColumnBuilder SortComparer(string sortComparer)
Parameters
Type |
Name |
Description |
System.String |
sortComparer |
|
Returns
Template(String)
Defines the column template that renders customized element in each cell of the column.
It accepts either template string or HTML element ID.
Declaration
public TreeGridColumnBuilder 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 TreeGridColumnBuilder TextAlign(TextAlign textAlign)
Parameters
Returns
Type(String)
Defines the data type of the column.
Declaration
public TreeGridColumnBuilder Type(string type)
Parameters
Type |
Name |
Description |
System.String |
type |
|
Returns
Uid(String)
Gets the unique identifier value of the column. It is used to get the object.
Declaration
public TreeGridColumnBuilder Uid(string uid)
Parameters
Type |
Name |
Description |
System.String |
uid |
|
Returns
ValidationRules(Object)
Defines rules to validate data before creating and updating.
Declaration
public TreeGridColumnBuilder ValidationRules(object validationRules)
Parameters
Type |
Name |
Description |
System.Object |
validationRules |
|
Returns
ValueAccessor(Object)
Defines the method used to apply custom cell values from external function and display this on each cell rendered.
Declaration
public TreeGridColumnBuilder ValueAccessor(object valueAccessor)
Parameters
Type |
Name |
Description |
System.Object |
valueAccessor |
|
Returns
ValueAccessor(String)
Defines the method used to apply custom cell values from external function and display this on each cell rendered.
Declaration
public TreeGridColumnBuilder ValueAccessor(string valueAccessor)
Parameters
Type |
Name |
Description |
System.String |
valueAccessor |
|
Returns
Visible(Boolean)
If visible
is set to false, hides the particular column. By default, columns are displayed.
Declaration
public TreeGridColumnBuilder Visible(bool visible)
Parameters
Type |
Name |
Description |
System.Boolean |
visible |
|
Returns
Width(Double)
Defines the width of the column in pixels or percentage.
Declaration
public TreeGridColumnBuilder 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 TreeGridColumnBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns