menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridStackedColumnBuilder - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridStackedColumnBuilder

    Inheritance
    System.Object
    Syncfusion.EJ2.ControlBuilder
    GridStackedColumnBuilder
    Namespace: Syncfusion.EJ2.Grids
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class GridStackedColumnBuilder : ControlBuilder

    Constructors

    GridStackedColumnBuilder()

    Declaration
    public GridStackedColumnBuilder()

    GridStackedColumnBuilder(List<GridStackedColumn>)

    Declaration
    public GridStackedColumnBuilder(List<GridStackedColumn> collection)
    Parameters
    Type Name Description
    System.Collections.Generic.List<GridStackedColumn> collection

    Methods

    Add()

    Declaration
    public void Add()

    AllowEditing(Boolean)

    If allowEditing set to false, then it disables editing of a particular column. By default all columns are editable.

    Declaration
    public GridStackedColumnBuilder AllowEditing(bool allowEditing)
    Parameters
    Type Name Description
    System.Boolean allowEditing
    Returns
    Type
    GridStackedColumnBuilder

    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 GridStackedColumnBuilder AllowFiltering(bool allowFiltering)
    Parameters
    Type Name Description
    System.Boolean allowFiltering
    Returns
    Type
    GridStackedColumnBuilder

    AllowGrouping(Boolean)

    If allowGrouping set to false, then it disables grouping of a particular column. By default all columns are groupable.

    Declaration
    public GridStackedColumnBuilder AllowGrouping(bool allowGrouping)
    Parameters
    Type Name Description
    System.Boolean allowGrouping
    Returns
    Type
    GridStackedColumnBuilder

    AllowReordering(Boolean)

    If allowReordering set to false, then it disables reorder of a particular column. By default all columns can be reorder.

    Declaration
    public GridStackedColumnBuilder AllowReordering(bool allowReordering)
    Parameters
    Type Name Description
    System.Boolean allowReordering
    Returns
    Type
    GridStackedColumnBuilder

    AllowResizing(Boolean)

    If allowResizing set to false, it disables resize option of a particular column.

    Declaration
    public GridStackedColumnBuilder AllowResizing(bool allowResizing)
    Parameters
    Type Name Description
    System.Boolean allowResizing
    Returns
    Type
    GridStackedColumnBuilder

    AllowSearching(Boolean)

    If allowSearching set to false, then it disables Searching of a particular column. By default all columns allow Searching.

    Declaration
    public GridStackedColumnBuilder AllowSearching(bool allowSearching)
    Parameters
    Type Name Description
    System.Boolean allowSearching
    Returns
    Type
    GridStackedColumnBuilder

    AllowSorting(Boolean)

    If allowSorting set to false, then it disables sorting option of a particular column. By default all columns are sortable.

    Declaration
    public GridStackedColumnBuilder AllowSorting(bool allowSorting)
    Parameters
    Type Name Description
    System.Boolean allowSorting
    Returns
    Type
    GridStackedColumnBuilder

    AutoFit(Boolean)

    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 GridStackedColumnBuilder AutoFit(bool autoFit)
    Parameters
    Type Name Description
    System.Boolean autoFit
    Returns
    Type
    GridStackedColumnBuilder

    ClipMode(ClipMode)

    Defines the cell content's overflow mode. The available modes are Clip - Truncates the cell content when it overflows its area. Ellipsis - Displays ellipsis when the cell content overflows its area. EllipsisWithTooltip - Displays ellipsis when the cell content overflows its area also it will display tooltip while hover on ellipsis applied cell.

    Declaration
    public GridStackedColumnBuilder ClipMode(ClipMode clipMode)
    Parameters
    Type Name Description
    ClipMode clipMode
    Returns
    Type
    GridStackedColumnBuilder

    Columns(Object)

    Defines stacked columns

    Declaration
    public GridStackedColumnBuilder Columns(object columns)
    Parameters
    Type Name Description
    System.Object columns
    Returns
    Type
    GridStackedColumnBuilder

    Columns(String[])

    Defines stacked columns

    Declaration
    public GridStackedColumnBuilder Columns(string[] columns)
    Parameters
    Type Name Description
    System.String[] columns
    Returns
    Type
    GridStackedColumnBuilder

    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 GridStackedColumnBuilder Commands(object commands)
    Parameters
    Type Name Description
    System.Object commands
    Returns
    Type
    GridStackedColumnBuilder

    CustomAttributes(Object)

    The CSS styles and attributes of the content cells of a particular column can be customized.

    Declaration
    public GridStackedColumnBuilder CustomAttributes(object customAttributes)
    Parameters
    Type Name Description
    System.Object customAttributes
    Returns
    Type
    GridStackedColumnBuilder

    DataSource(Action<DataManagerBuilder>)

    Declaration
    public GridStackedColumnBuilder DataSource(Action<DataManagerBuilder> dataSource)
    Parameters
    Type Name Description
    System.Action<Syncfusion.EJ2.DataManagerBuilder> dataSource
    Returns
    Type
    GridStackedColumnBuilder

    DataSource(Object)

    Defines the column data source which will act as foreign data source.

    Declaration
    public GridStackedColumnBuilder DataSource(object dataSource)
    Parameters
    Type Name Description
    System.Object dataSource
    Returns
    Type
    GridStackedColumnBuilder

    DefaultValue(Object)

    Defines default values for the component when adding a new record to the Grid.

    Declaration
    public GridStackedColumnBuilder DefaultValue(object defaultValue)
    Parameters
    Type Name Description
    System.Object defaultValue
    Returns
    Type
    GridStackedColumnBuilder

    DisableHtmlEncode(Boolean)

    If disableHtmlEncode is set to true, it encodes the HTML of the header and content cells.

    Declaration
    public GridStackedColumnBuilder DisableHtmlEncode(bool disableHtmlEncode)
    Parameters
    Type Name Description
    System.Boolean disableHtmlEncode
    Returns
    Type
    GridStackedColumnBuilder

    DisplayAsCheckBox(Boolean)

    If displayAsCheckBox is set to true, it displays the column value as a check box instead of Boolean value.

    Declaration
    public GridStackedColumnBuilder DisplayAsCheckBox(bool displayAsCheckBox)
    Parameters
    Type Name Description
    System.Boolean displayAsCheckBox
    Returns
    Type
    GridStackedColumnBuilder

    Edit(Object)

    Defines the IEditCell(../../grid/edit/#cell-edit-template) object to customize default edit cell.

    Declaration
    public GridStackedColumnBuilder Edit(object edit)
    Parameters
    Type Name Description
    System.Object edit
    Returns
    Type
    GridStackedColumnBuilder

    EditTemplate(String)

    Defines the cell edit template that used as editor for a particular column. It accepts either template string or HTML element ID.

    Declaration
    public GridStackedColumnBuilder EditTemplate(string editTemplate)
    Parameters
    Type Name Description
    System.String editTemplate
    Returns
    Type
    GridStackedColumnBuilder

    EditType(String)

    Defines the type of component for editing.

    Declaration
    public GridStackedColumnBuilder EditType(string editType)
    Parameters
    Type Name Description
    System.String editType
    Returns
    Type
    GridStackedColumnBuilder

    EnableGroupByFormat(Boolean)

    If enableGroupByFormat set to true, then it groups the particular column by formatted values. By default no columns are group by format.

    Declaration
    public GridStackedColumnBuilder EnableGroupByFormat(bool enableGroupByFormat)
    Parameters
    Type Name Description
    System.Boolean enableGroupByFormat
    Returns
    Type
    GridStackedColumnBuilder

    Field(String)

    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 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 GridStackedColumnBuilder Field(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type
    GridStackedColumnBuilder

    Filter(Object)

    Defines the filter options to customize filtering for the particular column.

    Declaration
    public GridStackedColumnBuilder Filter(object filter)
    Parameters
    Type Name Description
    System.Object filter
    Returns
    Type
    GridStackedColumnBuilder

    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 GridStackedColumnBuilder FilterBarTemplate(object filterBarTemplate)
    Parameters
    Type Name Description
    System.Object filterBarTemplate
    Returns
    Type
    GridStackedColumnBuilder

    FilterTemplate(String)

    Defines the filter template/UI that used as filter for a particular column. It accepts either template string or HTML element ID.

    Declaration
    public GridStackedColumnBuilder FilterTemplate(string filterTemplate)
    Parameters
    Type Name Description
    System.String filterTemplate
    Returns
    Type
    GridStackedColumnBuilder

    ForeignKeyField(String)

    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 GridStackedColumnBuilder ForeignKeyField(string foreignKeyField)
    Parameters
    Type Name Description
    System.String foreignKeyField
    Returns
    Type
    GridStackedColumnBuilder

    ForeignKeyValue(String)

    Defines the display column name from the foreign data source which will be obtained from comparing local and foreign data

    Declaration
    public GridStackedColumnBuilder ForeignKeyValue(string foreignKeyValue)
    Parameters
    Type Name Description
    System.String foreignKeyValue
    Returns
    Type
    GridStackedColumnBuilder

    Format(String)

    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 GridStackedColumnBuilder Format(string format)
    Parameters
    Type Name Description
    System.String format
    Returns
    Type
    GridStackedColumnBuilder

    Formatter(Object)

    Defines the method which is used to achieve custom formatting from an external function. This function triggers before rendering of each cell.

    Declaration
    public GridStackedColumnBuilder Formatter(object formatter)
    Parameters
    Type Name Description
    System.Object formatter
    Returns
    Type
    GridStackedColumnBuilder

    Freeze(FreezeDirection)

    defines which side the column need to freeze The available built-in freeze directions are Left - Freeze the column at left side. Right - Freeze the column at right side. Fixed - Freeze the column at Center. None - Does not freeze the column.

    Declaration
    public GridStackedColumnBuilder Freeze(FreezeDirection freeze)
    Parameters
    Type Name Description
    FreezeDirection freeze
    Returns
    Type
    GridStackedColumnBuilder

    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 GridStackedColumnBuilder HeaderTemplate(string headerTemplate)
    Parameters
    Type Name Description
    System.String headerTemplate
    Returns
    Type
    GridStackedColumnBuilder

    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 GridStackedColumnBuilder HeaderText(string headerText)
    Parameters
    Type Name Description
    System.String headerText
    Returns
    Type
    GridStackedColumnBuilder

    HeaderTextAlign(TextAlign)

    Define the alignment of column header which is used to align the text of column header.

    Declaration
    public GridStackedColumnBuilder HeaderTextAlign(TextAlign headerTextAlign)
    Parameters
    Type Name Description
    TextAlign headerTextAlign
    Returns
    Type
    GridStackedColumnBuilder

    HeaderValueAccessor(Object)

    Defines the method used to apply custom header cell values from external function and display this on each cell rendered.

    Declaration
    public GridStackedColumnBuilder HeaderValueAccessor(object headerValueAccessor)
    Parameters
    Type Name Description
    System.Object headerValueAccessor
    Returns
    Type
    GridStackedColumnBuilder

    HeaderValueAccessor(String)

    Defines the method used to apply custom header cell values from external function and display this on each cell rendered.

    Declaration
    public GridStackedColumnBuilder HeaderValueAccessor(string headerValueAccessor)
    Parameters
    Type Name Description
    System.String headerValueAccessor
    Returns
    Type
    GridStackedColumnBuilder

    HideAtMedia(String)

    column visibility can change based on its Media Queries. hideAtMedia accepts only valid Media Queries.

    Declaration
    public GridStackedColumnBuilder HideAtMedia(string hideAtMedia)
    Parameters
    Type Name Description
    System.String hideAtMedia
    Returns
    Type
    GridStackedColumnBuilder

    Index(Double)

    Gets the unique identifier value of the column. It is used to get the object.

    Declaration
    public GridStackedColumnBuilder Index(double index)
    Parameters
    Type Name Description
    System.Double index
    Returns
    Type
    GridStackedColumnBuilder

    IsFrozen(Boolean)

    You can use this property to freeze selected columns in grid.

    Declaration
    public GridStackedColumnBuilder IsFrozen(bool isFrozen)
    Parameters
    Type Name Description
    System.Boolean isFrozen
    Returns
    Type
    GridStackedColumnBuilder

    IsIdentity(Boolean)

    If isIdentity is set to true, then this column is considered as identity column.

    Declaration
    public GridStackedColumnBuilder IsIdentity(bool isIdentity)
    Parameters
    Type Name Description
    System.Boolean isIdentity
    Returns
    Type
    GridStackedColumnBuilder

    IsPrimaryKey(Boolean)

    If isPrimaryKey is set to true, considers this column as the primary key constraint.

    Declaration
    public GridStackedColumnBuilder IsPrimaryKey(bool isPrimaryKey)
    Parameters
    Type Name Description
    System.Boolean isPrimaryKey
    Returns
    Type
    GridStackedColumnBuilder

    LockColumn(Boolean)

    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 GridStackedColumnBuilder LockColumn(bool lockColumn)
    Parameters
    Type Name Description
    System.Boolean lockColumn
    Returns
    Type
    GridStackedColumnBuilder

    MaxWidth(Double)

    Defines the maximum width of the column in pixel or percentage, which will restrict resizing beyond this pixel or percentage.

    Declaration
    public GridStackedColumnBuilder MaxWidth(double maxWidth)
    Parameters
    Type Name Description
    System.Double maxWidth
    Returns
    Type
    GridStackedColumnBuilder

    MaxWidth(String)

    Defines the maximum width of the column in pixel or percentage, which will restrict resizing beyond this pixel or percentage.

    Declaration
    public GridStackedColumnBuilder MaxWidth(string maxWidth)
    Parameters
    Type Name Description
    System.String maxWidth
    Returns
    Type
    GridStackedColumnBuilder

    MinWidth(Double)

    Defines the minimum width of the column in pixels or percentage.

    Declaration
    public GridStackedColumnBuilder MinWidth(double minWidth)
    Parameters
    Type Name Description
    System.Double minWidth
    Returns
    Type
    GridStackedColumnBuilder

    MinWidth(String)

    Defines the minimum width of the column in pixels or percentage.

    Declaration
    public GridStackedColumnBuilder MinWidth(string minWidth)
    Parameters
    Type Name Description
    System.String minWidth
    Returns
    Type
    GridStackedColumnBuilder

    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 GridStackedColumnBuilder ShowColumnMenu(bool showColumnMenu)
    Parameters
    Type Name Description
    System.Boolean showColumnMenu
    Returns
    Type
    GridStackedColumnBuilder

    ShowInColumnChooser(Boolean)

    If showInColumnChooser set to false, then hides the particular column in column chooser. By default all columns are displayed in column Chooser.

    Declaration
    public GridStackedColumnBuilder ShowInColumnChooser(bool showInColumnChooser)
    Parameters
    Type Name Description
    System.Boolean showInColumnChooser
    Returns
    Type
    GridStackedColumnBuilder

    SortComparer(Object)

    It defines the custom sort comparer function.

    Declaration
    public GridStackedColumnBuilder SortComparer(object sortComparer)
    Parameters
    Type Name Description
    System.Object sortComparer
    Returns
    Type
    GridStackedColumnBuilder

    SortComparer(String)

    It defines the custom sort comparer function.

    Declaration
    public GridStackedColumnBuilder SortComparer(string sortComparer)
    Parameters
    Type Name Description
    System.String sortComparer
    Returns
    Type
    GridStackedColumnBuilder

    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 GridStackedColumnBuilder Template(string template)
    Parameters
    Type Name Description
    System.String template
    Returns
    Type
    GridStackedColumnBuilder

    TemplateOptions(Object)

    Determines the behavior of the aria-label attribute for cells in template columns. If enableAriaLabel is set to false, the aria-label attribute is not applied to template column cells, which affects screen reader accessibility.

    Declaration
    public GridStackedColumnBuilder TemplateOptions(object templateOptions)
    Parameters
    Type Name Description
    System.Object templateOptions
    Returns
    Type
    GridStackedColumnBuilder

    TextAlign(TextAlign)

    Defines the alignment of the column in both header and content cells.

    Declaration
    public GridStackedColumnBuilder TextAlign(TextAlign textAlign)
    Parameters
    Type Name Description
    TextAlign textAlign
    Returns
    Type
    GridStackedColumnBuilder

    Type(String)

    Defines the data type of the column.

    Declaration
    public GridStackedColumnBuilder Type(string type)
    Parameters
    Type Name Description
    System.String type
    Returns
    Type
    GridStackedColumnBuilder

    Uid(String)

    Gets the unique identifier value of the column. It is used to get the object.

    Declaration
    public GridStackedColumnBuilder Uid(string uid)
    Parameters
    Type Name Description
    System.String uid
    Returns
    Type
    GridStackedColumnBuilder

    ValidationRules(Object)

    editType(../../grid/edit/#cell-edit-type-and-its-params) Defines rules to validate data before creating and updating.

    Declaration
    public GridStackedColumnBuilder ValidationRules(object validationRules)
    Parameters
    Type Name Description
    System.Object validationRules
    Returns
    Type
    GridStackedColumnBuilder

    ValueAccessor(Object)

    Defines the method used to apply custom cell values from external function and display this on each cell rendered.

    Declaration
    public GridStackedColumnBuilder ValueAccessor(object valueAccessor)
    Parameters
    Type Name Description
    System.Object valueAccessor
    Returns
    Type
    GridStackedColumnBuilder

    ValueAccessor(String)

    Defines the method used to apply custom cell values from external function and display this on each cell rendered.

    Declaration
    public GridStackedColumnBuilder ValueAccessor(string valueAccessor)
    Parameters
    Type Name Description
    System.String valueAccessor
    Returns
    Type
    GridStackedColumnBuilder

    Visible(Boolean)

    If visible is set to false, hides the particular column. By default, all columns are displayed.

    Declaration
    public GridStackedColumnBuilder Visible(bool visible)
    Parameters
    Type Name Description
    System.Boolean visible
    Returns
    Type
    GridStackedColumnBuilder

    Width(Double)

    Defines the width of the column in pixels or percentage.

    Declaration
    public GridStackedColumnBuilder Width(double width)
    Parameters
    Type Name Description
    System.Double width
    Returns
    Type
    GridStackedColumnBuilder

    Width(String)

    Defines the width of the column in pixels or percentage.

    Declaration
    public GridStackedColumnBuilder Width(string width)
    Parameters
    Type Name Description
    System.String width
    Returns
    Type
    GridStackedColumnBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved