New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Grid<T>

Class

Kendo UI Grid component

Definition

Constructors

Initializes a new instance of the Grid<T> class.

C#
public Grid(ViewContext viewContext)
Parameters:viewContextViewContext

Properties

Specifies the adaptive rendering of the component.

C#
public AdaptiveMode? AdaptiveMode { get; set; }

Defines the configuration options for the AI tools in the Grid.

C#
public GridAiSettings<T> Ai { get; }

If set to true and selection of the Grid is enabled, the user could copy the selection into the clipboard and paste it into Excel or other similar programs that understand TSV/CSV formats. By default allowCopy is disabled and the default format is TSV. Can be set to a JavaScript object which represents the allowCopy configuration.

C#
public GridAllowCopySettings<T> AllowCopy { get; }

If set to true and the selection functionality of the Grid is enabled, the user can paste the current textual content of the clipboard into the Grid.

C#
public bool? AllowPaste { get; set; }

If set to false, the Grid will not bind to the data source during initialization, i.e. it will not call the fetch method of the dataSource instance. In such scenarios data binding will occur when the change event of the dataSource instance is fired. By default, autoBind is set to true and the widget will bind to the data source specified in the configuration.

C#
public bool? AutoBind { get; set; }

Gets or sets the AutoGenerateColumns.

C#
public bool AutoGenerateColumns { get; set; }

Gets or sets the ClientAltRowTemplate.

C#
public string ClientAltRowTemplate { get; set; }

ClientAltRowTemplateHandler member.

C#
public string ClientAltRowTemplateHandler { get; set; }

Gets or sets the ClientDetailTemplate.

C#
public string ClientDetailTemplate { get; set; }

Gets or sets the ClientDetailTemplateHandler.

C#
public string ClientDetailTemplateHandler { get; set; }

Gets or sets the ClientDetailTemplateId.

C#
public string ClientDetailTemplateId { get; set; }

Gets or sets the ClientRowTemplate.

C#
public string ClientRowTemplate { get; set; }

ClientRowTemplateHandler member.

C#
public string ClientRowTemplateHandler { get; set; }

If set to true the grid will display the column menu when the user clicks the chevron icon in the column headers. The column menu allows the user to show and hide columns, filter and sort (if filtering and sorting are enabled). By default the column menu is not enabled.Can be set to a JavaScript object which represents the column menu configuration.

C#
public GridColumnMenuSettings<T> ColumnMenu { get; }

Defines the width of the column resize handle in pixels. Apply a larger value for easier grasping.

C#
public double? ColumnResizeHandleWidth { get; set; }

Gets the columns of the grid.

C#
public IList<GridColumnBase<T>> Columns { get; }

Implements: IGridColumnContainer<T>.Columns

ContextMenu member.

C#
public GridContextMenuSettings ContextMenu { get; }

Defines the data layout mode of the grid.

C#
public DataLayoutMode? DataLayoutMode { get; set; }

Gets or sets the DataSource.

C#
public DataSource DataSource { get; }

Gets or sets the DataSourceId.

C#
public string DataSourceId { get; set; }

Editable member.

C#
public GridEditableSettings<T> Editable { get; }

EditorHtml member.

C#
public string EditorHtml { get; set; }

Gets or sets a value indicating whether custom binding is enabled.

C#
public bool EnableCustomBinding { get; set; }
Property Value:

true if custom binding is enabled; otherwise, false. The default value is false

If set to true the column title will be HTML-encoded before it is displayed. If set to false the column title will be displayed as is.

C#
public bool? EncodeTitles { get; set; }

Configures the Kendo UI Grid Excel export settings.

C#
public GridExcelSettings<T> Excel { get; }

Gets the filtering configuration.

C#
public GridFilterableSettings Filterable { get; }

If set to true the user could group the grid by dragging the column header cells. By default grouping is disabled.Can be set to a JavaScript object which represents the grouping configuration.

C#
public GridGroupableSettings<T> Groupable { get; }

Gets or sets the Height.

C#
public string Height { get; set; }

Defines the type of the loader that will be displayed while loading the data

C#
public GridLoaderType? LoaderType { get; set; }

Messages member.

C#
public GridMessages Messages { get; }

Gets or sets the Mobile.

C#
public MobileMode Mobile { get; set; }

If set to true the user could navigate the component using the keyboard navigation. By default keyboard navigation is disabled.

C#
public bool? Navigatable { get; set; }

If set to true and current view contains no records, message similar to "No records available" will be displayed. By default this option is disabled.

C#
public GridNoRecordsSettings<T> NoRecords { get; }

Gets the paging configuration.

C#
public GridPageableSettings Pageable { get; }

Configures the Kendo UI Grid PDF export settings.

C#
public GridPdfSettings<T> Pdf { get; }

Sets a value indicating whether the selection will be persisted when sorting, paging, filtering and etc are performed.

C#
public bool? PersistSelection { get; set; }

Enables row pinning for the Grid. When enabled, rows can be pinned to the top or bottom of the Grid so they remain visible while scrolling through the remaining data. Pinned rows are rendered in dedicated containers above and below the scrollable content area.The pinnable option can be set to true to enable the feature without initially pinned rows, or to an object specifying which rows to pin by their ID values.

C#
public GridPinnableSettings<T> Pinnable { get; }

A function that allows customizing the rendering of pinned rows. The function receives an object with two fields: dataItem (the data item for the row) and row (the default HTML string for the row). The function must return an HTML string.If not set, pinned rows use the same template as regular rows.

C#
public string PinnedRowTemplateHandler { get; set; }

Gets or sets a value indicating whether to add the Name property of the grid as a prefix in url parameters.

C#
public bool PrefixUrlParameters { get; set; }
Property Value:

true if prefixing is enabled; otherwise, false. The default value is false

Reorderable member.

C#
public GridReorderableSettings Reorderable { get; }

Resizable member.

C#
public GridResizableSettings Resizable { get; }

Gets the scrolling configuration.

C#
public GridScrollableSettings Scrollable { get; }

Configures the Kendo UI Grid search bar settings.

C#
public GridSearchSettings<T> Search { get; }

Gets the selection configuration

C#
public GridSelectableSettings Selectable { get; }

Size member.

C#
public ComponentSize? Size { get; set; }

Defines the configuration options for the SmartBox tool in the Grid. The SmartBox provides a unified interface for search, semantic search, and AI assistant capabilities.

C#
public GridSmartBoxSettings<T> SmartBox { get; }

If set to true the user could sort the grid by clicking the column header cells. By default sorting is disabled.Can be set to a JavaScript object which represents the sorting configuration.

C#
public GridSortableSettings<T> Sortable { get; }

The stacked layout settings of the Grid.

C#
public GridStackedLayoutSettingsSettings<T> StackedLayoutSettings { get; }

The template which renders the Status Bar/Aggregates Bar.

C#
public string StatusBarTemplateHandler { get; set; }

ToolBar member.

C#
public GridToolBarSettings ToolBar { get; }

Gets or sets the Width.

C#
public string Width { get; set; }

Methods

ProcessSettings method.

C#
public override void ProcessSettings()

Overrides: WidgetBase.ProcessSettings()

Serializes the component settings to a dictionary.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

A dictionary of settings.

Overrides: WidgetBase.Serialize()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: WidgetBase.SerializeSettings()

Gets the visible columns of the grid.

C#
public IList<GridColumnBase<T>> VisibleColumns()
Returns:

IList<GridColumnBase<T>>

Writes the HTML content.

C#
protected override void WriteHtml(TextWriter writer)
Parameters:writerTextWriter

The text writer.

Overrides: WidgetBase.WriteHtml(TextWriter)

WriteInitializationScript method.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

Overrides: WidgetBase.WriteInitializationScript(TextWriter)