Grid<T>
The server side wrapper for Kendo UI Grid
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Type Parameters:
T
Syntax:
public class Grid<T> : WidgetBase, IWidget, IHtmlAttributesContainer, IScriptableComponent, IGridColumnContainer<T>, IGrid where T : class
Inheritance: objectWidgetBaseGrid<T>
Implements:
Inherited Members
Constructors
public Grid(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator, IGridHtmlBuilderFactory htmlBuilderFactory)
Properties
Specifies the adaptive rendering of the component.
public AdaptiveMode? AdaptiveMode { get; set; }
public IEnumerable<AggregateDescriptor> Aggregates { get; }
Defines the configuration options for the AI tools in the Grid.
public GridAiSettings<T> Ai { get; }
public AllowCopySettings AllowCopy { get; set; }
public bool? AllowPaste { get; set; }
public bool AutoGenerateColumns { get; set; }
Gets or sets the action executed when rendering a cell.
public Action<GridCell<T>> CellAction { get; set; }
public string ClientAltRowTemplate { get; set; }
public string ClientAltRowTemplateHandler { get; set; }
public string ClientDetailTemplateHandler { get; set; }
public string ClientDetailTemplateId { get; set; }
public string ClientRowTemplate { get; set; }
public string ClientRowTemplateHandler { get; set; }
Gets the column menu configuration.
public GridColumnMenuSettings ColumnMenu { get; }
Implements:
public int ColumnResizeHandleWidth { get; set; }
Gets the columns of the grid.
public IList<GridColumnBase<T>> Columns { get; }
Implements:
public GridContextMenuSettings ContextMenu { get; }
public int CurrentPage { get; }
Defines the data layout mode of the grid.
public DataLayoutMode? DataLayoutMode { get; set; }
public DataSource DataSource { get; }
Implements:
public string DataSourceId { get; set; }
Implements:
public HtmlTemplate<T> DetailTemplate { get; }
public GridEditableSettings<T> Editable { get; }
public string EditorHtml { get; set; }
Implements:
Gets or sets a value indicating whether custom binding is enabled.
public bool EnableCustomBinding { get; set; }
true if custom binding is enabled; otherwise, false. The default value is false
Implements:
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.
public bool? EncodeTitles { get; set; }
public GridExcelSettings Excel { get; }
Gets the filtering configuration.
public GridFilterableSettings Filterable { get; }
Implements:
public GridGroupableSettings Grouping { get; }
Implements:
public bool HasDetailTemplate { get; }
Implements:
public bool IsClientBinding { get; }
Defines the type of the loader that will be displayed while loading the data
public GridLoaderType? LoaderType { get; set; }
public GridMessages Messages { get; }
public MobileMode Mobile { get; set; }
Gets the keyboard navigation configuration.
public GridNavigatableSettings Navigatable { get; }
public GridNoRecordsSettings NoRecords { get; set; }
public HtmlTemplate NoRecordsTemplate { get; }
Gets the paging configuration.
public GridPageableSettings Pageable { get; }
Implements:
public PDFSettings Pdf { get; }
public bool? PersistSelection { get; set; }
public GridPinnableSettings Pinnable { get; }
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.
public bool PrefixUrlParameters { get; set; }
true if prefixing is enabled; otherwise, false. The default value is true
public GridReorderableSettings Reorderable { get; }
public GridResizableSettings Resizable { get; }
Gets or sets the action executed when rendering a row.
public Action<GridRow<T>> RowAction { get; set; }
Gets the template which the grid will use to render a row
public HtmlTemplate<T> RowTemplate { get; }
Gets the scrolling configuration.
public GridScrollableSettings Scrollable { get; }
Implements:
Configures the Kendo UI Grid search bar settings.
public GridSearchSettings<T> Search { get; }
Gets the selection configuration
public GridSelectableSettings Selectable { get; }
public bool ShowGroupHeaderColumn { get; }
public ComponentSize Size { get; set; }
Implements:
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.
public GridSmartBoxSettings<T> SmartBox { get; }
Gets the sorting configuration.
public GridSortableSettings Sortable { get; }
The sorting.
Implements:
The stacked layout settings of the Grid.
public GridStackedLayoutSettingsSettings StackedLayoutSettings { get; }
public string StatusBarTemplate { get; set; }
public string StatusBarTemplateHandler { get; set; }
public IDictionary<string, object> TableHtmlAttributes { get; }
public GridToolBarSettings<T> ToolBar { get; }
public IGridUrlBuilder UrlBuilder { get; }
public IUrlGenerator UrlGenerator { get; }
Implements:
public IDictionary<string, object> ValidationMetadata { get; }
Methods
Insert Create button
Insert Destroy button
Insert Save button
public override IDictionary<string, object> Serialize()
Overrides:
public override void VerifySettings()
Overrides:
Writes the HTML.
protected override void WriteHtml(HtmlTextWriter writer)
Overrides:
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The writer.
Overrides: