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

The fluent API for configuring Kendo UI Grid for ASP.NET MVC.

Definition

Constructors

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

C#
public GridBuilder(Grid<T> component)
Parameters:componentGrid<T>

The component.

Methods

Specifies the adaptive rendering of the component.

C#
public GridBuilder<T> AdaptiveMode(AdaptiveMode value)
Parameters:valueAdaptiveMode

The value for AdaptiveMode

Returns:

GridBuilder<T>

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

C#
public GridBuilder<T> AI(Action<GridAiSettingsBuilder<T>> configurator)
Parameters:configuratorAction<GridAiSettingsBuilder<T>>

The GridAiSettingsBuilder<T> for the ai setting.

Returns:

GridBuilder<T>

Returns the current instance of GridBuilder<T> .

Configures the allow copy settings of the grid.

C#
public GridBuilder<T> AllowCopy(Action<GridAllowCopyBuilder> configurator)
Parameters:configuratorAction<GridAllowCopyBuilder>

The lambda which configures the allow copy settings.

Returns:

GridBuilder<T>

If set to true users can copy the selection to the clipboard and paste it to Excel or similar spreadsheet applications. Setting AllowCopy to true requires Selectable to be enabled.

C#
public GridBuilder<T> AllowCopy(bool value)
Parameters:valuebool

If true the grid will be automatically data bound, otherwise false

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.AllowCopy(false)
.Selectable(selectable =&gt; selectable
.Mode(GridSelectionMode.Multiple)
.Type(GridSelectionType.Cell))
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

If set to true and selection of the Grid is enabled, the user can paste the current text contents of the clipboard into the Grid.

C#
public GridBuilder<T> AllowPaste()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Selectable()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
.AllowPaste()
)

If set to true and selection of the Grid is enabled, the user can paste the current text contents of the clipboard into the Grid.

C#
public GridBuilder<T> AllowPaste(bool value)
Parameters:valuebool

The value for AllowPaste

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Selectable()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
.AllowPaste(true)
)

If set to false the widget will not bind to the data source during initialization; the default value is true. Setting AutoBind to false is supported in ajax-bound mode.

C#
public GridBuilder<T> AutoBind(bool value)
Parameters:valuebool

If true the grid will be automatically data bound, otherwise false

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.AutoBind(false)
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Binds the grid to a list of objects

C#
public GridBuilder<T> BindTo(IEnumerable dataSource)
Parameters:dataSourceIEnumerable

The data source.

Returns:

GridBuilder<T>

Example:
C#
@model IEnumerable;
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.BindTo(Model)
)

Binds the grid to a list of objects

C#
public GridBuilder<T> BindTo(IEnumerable<T> dataSource)
Parameters:dataSourceIEnumerable<T>

The data source.

Returns:

GridBuilder<T>

Example:
C#
@model IEnumerable&lt;Product&gt;
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.BindTo(Model)
)

Sets a lambda which is executed for every table cell rendered server-side by the grid.

C#
public GridBuilder<T> CellAction(Action<GridCell<T>> configurator)
Parameters:configuratorAction<GridCell<T>>

The lambda which will be executed for every table cell

Returns:

GridBuilder<T>

Example:
C#
@model IEnumerable&lt;Product&gt;
@(Html.Kendo().Grid(Model)
.Name("grid")
.CellAction(cell =&gt;
{
if (cell.Column.Member == "UnitsInStock")
{
if (cell.DataItem.UnitsInStock &gt; 10)
{
//Set the background of this cell only
cell.HtmlAttributes["style"] = "background:red;";
}
}
})
)

Sets the client-side alt row template of the grid. The client-side alt row template must contain a table row element (tr).

C#
public GridBuilder<T> ClientAltRowTemplate(Func<Grid<T>, string> template)
Parameters:templateFunc<Grid<T>, string>

The template

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ClientAltRowTemplate(grid =&gt;
"&lt;tr&gt;" +
"&lt;td&gt;#: ProductName #&lt;/td&gt;" +
"&lt;td&gt;#: UnitsInStock #&lt;/td&gt;" +
"&lt;/tr&gt;"
)
)

Sets the client-side alt row template of the grid. The client-side alt row template must contain a table row element (tr).

C#
public GridBuilder<T> ClientAltRowTemplate(string template)
Parameters:templatestring

The template

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ClientAltRowTemplate(
"&lt;tr class='k-alt'&gt;" +
"&lt;td&gt;#: ProductName #&lt;/td&gt;" +
"&lt;td&gt;#: UnitsInStock #&lt;/td&gt;" +
"&lt;/tr&gt;"
)
)

Sets the client alt row template for the grid using a template builder.

C#
public GridBuilder<T> ClientAltRowTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The template builder that defines the client alt row template.

Returns:

GridBuilder<T>

Sets the name of the JavaScript function that will be used as the client alt row template handler for the grid.

C#
public GridBuilder<T> ClientAltRowTemplateHandler(string template)
Parameters:templatestring

The name of the JavaScript function that will handle the client alt row template.

Returns:

GridBuilder<T>

C#
public GridBuilder<T> ClientDetailTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>Returns:

GridBuilder<T>

C#
public GridBuilder<T> ClientDetailTemplateHandler(string value)
Parameters:valuestringReturns:

GridBuilder<T>

Sets the id of the script element which contains the client-side detail template of the grid.

C#
public GridBuilder<T> ClientDetailTemplateId(string id)
Parameters:idstring

The id

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ClientDetailTemplateId("detail-template")
)
&lt;script id="detail-template" type="text/x-kendo-template"&gt;
Product Details:
&lt;div&gt;Product Name: #: ProductName # &lt;/div&gt;
&lt;div&gt;Units In Stock: #: UnitsInStock #&lt;/div&gt;
&lt;/script&gt;

Sets the id of the script element which contains the client-side detail template of the grid.

C#
public GridBuilder<T> ClientDetailTemplateView(MvcHtmlString template)
Parameters:templateMvcHtmlStringReturns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ClientDetailTemplateView(Html.Partial("detail-template"))
)
&lt;script id="detail-template" type="text/x-kendo-template"&gt;
Product Details:
&lt;div&gt;Product Name: #: ProductName # &lt;/div&gt;
&lt;div&gt;Units In Stock: #: UnitsInStock #&lt;/div&gt;
&lt;/script&gt;

Sets the client-side row template of the grid. The client-side row template must contain a table row element (tr).

C#
public GridBuilder<T> ClientRowTemplate(Func<Grid<T>, string> template)
Parameters:templateFunc<Grid<T>, string>

The template

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ClientRowTemplate(grid =&gt;
"&lt;tr&gt;" +
"&lt;td&gt;#: ProductName #&lt;/td&gt;" +
"&lt;td&gt;#: UnitsInStock #&lt;/td&gt;" +
"&lt;/tr&gt;"
)
)

Sets the client-side row template of the grid. The client-side row template must contain a table row element (tr).

C#
public GridBuilder<T> ClientRowTemplate(string template)
Parameters:templatestring

The template

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ClientRowTemplate(
"&lt;tr&gt;" +
"&lt;td&gt;#: ProductName #&lt;/td&gt;" +
"&lt;td&gt;#: UnitsInStock #&lt;/td&gt;" +
"&lt;/tr&gt;"
)
)

Sets the client row template for the grid using a template builder.

C#
public GridBuilder<T> ClientRowTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The template builder that defines the client row template.

Returns:

GridBuilder<T>

Sets the name of the JavaScript function that will be used as the client row template handler for the grid.

C#
public GridBuilder<T> ClientRowTemplateHandler(string template)
Parameters:templatestring

The name of the JavaScript function that will handle the client row template.

Returns:

GridBuilder<T>

Enables the grid column menu.

C#
public GridBuilder<T> ColumnMenu()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ColumnMenu()
)

Sets the column menu configuration of the grid.

C#
public GridBuilder<T> ColumnMenu(Action<GridColumnMenuSettingsBuilder> configurator)
Parameters:configuratorAction<GridColumnMenuSettingsBuilder>

The lambda which configures the column menu

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ColumnMenu(columnMenu =&gt; columnMenu.Enabled(true))
)

Sets the width of the column resize handle. Apply a larger value for easier grasping.

C#
public GridBuilder<T> ColumnResizeHandleWidth(int width)
Parameters:widthint

width in pixels

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("Grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ColumnResizeHandleWidth(8)
)

Sets the column configuration of the grid.

C#
public GridBuilder<T> Columns(Action<GridColumnFactory<T>> configurator)
Parameters:configuratorAction<GridColumnFactory<T>>

The lambda which configures columns

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(product =&gt; product.ProductName).Title("Product Name");
columns.Command(command =&gt; command.Destroy());
})
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Destroy(destroy =&gt; destroy.Action("Products_Destroy", "Home"))
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Enables the Grid's Context Menu.

C#
public GridBuilder<T> ContextMenu()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.ContextMenu()
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the ContextMenu configuration of the grid.

C#
public GridBuilder<T> ContextMenu(Action<GridContextMenuBuilder> configurator)
Parameters:configuratorAction<GridContextMenuBuilder>

The lambda which configures the Context Menu

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("Grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ContextMenu(menu =&gt; menu.Body(body =&gt; body.ExportPDF()))
)

Defines the data layout mode of the grid.

C#
public GridBuilder<T> DataLayoutMode(DataLayoutMode value)
Parameters:valueDataLayoutMode

The value for DataLayoutMode

Returns:

GridBuilder<T>

Returns the current GridBuilder<T> instance.

Sets the data source configuration of the grid.

C#
public GridBuilder<T> DataSource(Action<DataSourceBuilder<T>> configurator)
Parameters:configuratorAction<DataSourceBuilder<T>>

The lambda which configures the data source

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the ID of the DataSource widget used by the Grid.

C#
public GridBuilder<T> DataSource(string dataSourceId)
Parameters:dataSourceIdstring

The id of the DataSource

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource("dataSource")
)

Sets the server-side detail template of the grid in ASPX views.

C#
public GridBuilder<T> DetailTemplate(Action<T> codeBlockTemplate)
Parameters:codeBlockTemplateAction<T>

The template as a code block

Returns:

GridBuilder<T>

Example:
C#
@model IEnumerable&lt;Product&gt;
@(Html.Kendo().Grid(Model)
.Name("grid")
.DetailTemplate(product =&gt; {
)
Product Details:
&lt;div&gt;Product Name: @( product.ProductName )&lt;/div&gt;
&lt;div&gt;Units In Stock: @( product.UnitsInStock )&lt;/div&gt;
(
})
.Render();
)

Sets the server-side detail template of the grid in Razor views.

C#
public GridBuilder<T> DetailTemplate(Func<T, object> inlineTemplate)
Parameters:inlineTemplateFunc<T, object>

The template

Returns:

GridBuilder<T>

Example:
C#
@model IEnumerable&lt;Product&gt;
@(Html.Kendo().Grid(Model)
.Name("grid")
.DetailTemplate(@&lt;text&gt;
Product Details:
&lt;div&gt;Product Name: @product.ProductName&lt;/div&gt;
&lt;div&gt;Units In Stock: @product.UnitsInStock&lt;/div&gt;
&lt;/text&gt;)
)

Enables grid editing.

C#
public GridBuilder<T> Editable()
Returns:

GridBuilder<T>

Example:
C#
@( Html.Kendo().Grid&lt;Product&gt;()
.Name("Grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.Editable()
)

Sets the editing configuration of the grid.

C#
public GridBuilder<T> Editable(Action<GridEditingSettingsBuilder<T>> configurator)
Parameters:configuratorAction<GridEditingSettingsBuilder<T>>

The lambda which configures the editing

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.Editable(editing =&gt; editing.Mode(GridEditMode.PopUp))
)

Sets the edit mode of the grid.

C#
public GridBuilder<T> Editable(GridEditMode configurator)
Parameters:configuratorGridEditMode

The lambda which configures the editing

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.Editable(GridEditMode.PopUp)
)

If set to true the grid will perform custom binding.

C#
public GridBuilder<T> EnableCustomBinding(bool value)
Parameters:valuebool

If true enables custom binding.

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.EnableCustomBinding(true)
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

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 GridBuilder<T> EncodeTitles()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.DataSource(dataSource =&gt; dataSource
.Ajax()
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
.EncodeTitles()
)

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 GridBuilder<T> EncodeTitles(bool value)
Parameters:valuebool

The value for EncodeTitles

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.DataSource(dataSource =&gt; dataSource
.Ajax()
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
.EncodeTitles(true)
)

Sets the event configuration of the grid.

C#
public GridBuilder<T> Events(Action<GridEventBuilder> configurator)
Parameters:configuratorAction<GridEventBuilder>

The lambda which configures the events

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.Events(events =&gt; events.DataBound("grid_dataBound"))
)
&lt;script&gt;
function grid_dataBound(e) {
// handle the dataBound event
}
&lt;/script&gt;

Configures the Excel export settings.

C#
public GridBuilder<T> Excel(Action<GridExcelBuilder> configurator)
Parameters:configuratorAction<GridExcelBuilder>Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Excel(excel =&gt; excel.FileName("GridExport.xlsx"))
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Enables grid filtering.

C#
public GridBuilder<T> Filterable()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Filterable()
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the filtering configuration of the grid.

C#
public GridBuilder<T> Filterable(Action<GridFilterableSettingsBuilder> configurator)
Parameters:configuratorAction<GridFilterableSettingsBuilder>

The lambda which configures the filtering

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Filterable(filtering =&gt; filtering.Enabled(true))
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Enables grid grouping.

C#
public GridBuilder<T> Groupable()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Groupable()
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the grouping configuration of the grid.

C#
public GridBuilder<T> Groupable(Action<GridGroupingSettingsBuilder> configurator)
Parameters:configuratorAction<GridGroupingSettingsBuilder>

The lambda which configures the grouping

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Groupable(grouping =&gt; grouping.Enabled(true))
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the height of the grid.

C#
public GridBuilder<T> Height(int pixelHeight)
Parameters:pixelHeightint

The height of the grid. Numeric values are treated as pixels.

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Height(400)
.Pageable()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(10)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

Sets the height of the grid.

C#
public GridBuilder<T> Height(string value)
Parameters:valuestring

The height of the grid.

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Height("400px")
.Pageable()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(10)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

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

C#
public GridBuilder<T> LoaderType(GridLoaderType value)
Parameters:valueGridLoaderType

The value for LoaderType

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.LoaderType(GridLoaderType.LoadingPanel)
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

Configures the grid messages.

C#
public GridBuilder<T> Messages(Action<GridMessagesBuilder> configurator)
Parameters:configuratorAction<GridMessagesBuilder>

Defines the text of the messages used by the Grid

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Messages(m =&gt; m.ExpandCollapseColumnHeader("E/C"))
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

Enables the adaptive rendering when viewed on mobile browser

C#
public GridBuilder<T> Mobile()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Mobile()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

Used to determine if adaptive rendering should be used when viewed on mobile browser

C#
public GridBuilder<T> Mobile(MobileMode type)
Parameters:typeMobileMode

Defines the type of the Mobile Mode

Returns:

GridBuilder<T>

Currently the Grid widget doesn't distinguish between phone and tablet option.

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Mobile(MobileMode.Phone)
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

Enables grid keyboard navigation.

C#
public GridBuilder<T> Navigatable()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Navigatable()
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the keyboard navigation configuration of the grid.

C#
public GridBuilder<T> Navigatable(Action<GridNavigatableSettingsBuilder> configurator)
Parameters:configuratorAction<GridNavigatableSettingsBuilder>

The lambda which configures the keyboard navigation

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Navigatable(navigation =&gt; navigation.Enabled(true))
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Enables grid noRecords.

C#
public GridBuilder<T> NoRecords()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.NoRecords()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

Sets the noRecords configuration of the grid.

C#
public GridBuilder<T> NoRecords(Action<GridNoRecordsSettingsBuilder> configurator)
Parameters:configuratorAction<GridNoRecordsSettingsBuilder>

The lambda which configures the noRecords

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.NoRecords(n =&gt; n.Template("No data available on current page. Current page is: #=this.dataSource.page()#"))
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
)
)

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 GridBuilder<T> NoRecords(bool enabled)
Parameters:enabledbool

Enables or disables the norecords option.

Returns:

GridBuilder<T>

Returns the current instance of GridNoRecordsSettingsBuilder<T> .

Enables grid noRecords and sets it's message.

C#
public GridBuilder<T> NoRecords(string text)
Parameters:textstring

The message used for noRecords

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.NoRecords("No records")
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
)
)

Enables grid paging.

C#
public GridBuilder<T> Pageable()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Pageable()
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the paging configuration of the grid.

C#
public GridBuilder<T> Pageable(Action<GridPageableSettingsBuilder> configurator)
Parameters:configuratorAction<GridPageableSettingsBuilder>

The lambda which configures the paging

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Pageable(paging =&gt;
paging.Refresh(true)
)
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Configures the PDF export settings.

C#
public GridBuilder<T> Pdf(Action<PDFSettingsBuilder> configurator)
Parameters:configuratorAction<PDFSettingsBuilder>Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Pdf(pdf =&gt; pdf.FileName("GridExport.pdf"))
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

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

C#
public GridBuilder<T> PersistSelection()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Scrollable()
.PersistSelection()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

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

C#
public GridBuilder<T> PersistSelection(bool value)
Parameters:valuebool

The value for PersistSelection

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Scrollable()
.PersistSelection(true)
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

Enables row pinning for the Grid. When enabled, users can pin rows to the top or bottom of the Grid.

C#
public GridBuilder<T> Pinnable()
Returns:

GridBuilder<T>

Enables row pinning for the Grid and allows further configuration of pinnable settings.

C#
public GridBuilder<T> Pinnable(Action<GridPinnableSettingsBuilder<T>> configurator)
Parameters:configuratorAction<GridPinnableSettingsBuilder<T>>

The action that configures the pinnable settings.

Returns:

GridBuilder<T>

Enables or disables row pinning for the Grid.

C#
public GridBuilder<T> Pinnable(bool enabled)
Parameters:enabledbool

If true, row pinning is enabled; otherwise, false.

Returns:

GridBuilder<T>

Sets the template used for rendering pinned rows in the Grid using a template builder.

C#
public GridBuilder<T> PinnedRowTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The template builder that defines the pinned row template.

Returns:

GridBuilder<T>

Sets the template used for rendering pinned rows in the Grid. Accepts a Kendo UI template string.

C#
public GridBuilder<T> PinnedRowTemplateHandler(string template)
Parameters:templatestring

The Kendo UI template string for pinned rows.

Returns:

GridBuilder<T>

If set to true the grid will prefix the query string parameters with its name during server binding. By default the grid will prefix the query string parameters.

C#
public GridBuilder<T> PrefixUrlParameters(bool prefix)
Parameters:prefixboolReturns:

GridBuilder<T>

Example:
C#
@model IEnumerable&lt;Product&gt;
@(Html.Kendo().Grid(Model)
.Name("grid")
.PrefixUrlParameters(false)
)

Sets the reordering configuration of the grid.

C#
public GridBuilder<T> Reorderable(Action<GridReorderingSettingsBuilder> configurator)
Parameters:configuratorAction<GridReorderingSettingsBuilder>

The lambda which configures the reordering

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("Grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.Reorderable(reordering =&gt; reordering.Columns(true).Rows(true))
)

Sets the resizing configuration of the grid.

C#
public GridBuilder<T> Resizable(Action<GridResizingSettingsBuilder> configurator)
Parameters:configuratorAction<GridResizingSettingsBuilder>

The lambda which configures the resizing

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("Grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.Resizable(resizing =&gt; resizing.Columns(true))
)

Sets a lambda which is executed for every table row rendered server-side by the grid.

C#
public GridBuilder<T> RowAction(Action<GridRow<T>> configurator)
Parameters:configuratorAction<GridRow<T>>

The lambda which will be executed for every table row

Returns:

GridBuilder<T>

Example:
C#
@model IEnumerable&lt;Product&gt;
@(Html.Kendo().Grid(Model)
.Name("grid")
.RowAction(row =&gt;
{
// "DataItem" is the Product instance to which the current row is bound
if (row.DataItem.UnitsInStock &gt; 10)
{
//Set the background of the entire row
row.HtmlAttributes["style"] = "background:red;";
}
});
)

Sets the server-side row template of the grid in ASPX views.

C#
public GridBuilder<T> RowTemplate(Action<T, Grid<T>> codeBlockTemplate)
Parameters:codeBlockTemplateAction<T, Grid<T>>

The template as a code block

Returns:

GridBuilder<T>

Example:
C#
@(@Page Inherits="System.Web.Mvc.ViewPage&lt;IEnumerable&lt;Product&gt;&gt;" )
@( Html.Kendo().Grid(Model)
.Name("grid")
.RowTemplate((product, grid) =&gt;
{
)
&lt;div&gt;Product Name: @( product.ProductName )&lt;/div&gt;
&lt;div&gt;Units In Stock: @( product.UnitsInStock )&lt;/div&gt;
(
})
)

Sets the server-side row template of the grid in ASPX views.

C#
public GridBuilder<T> RowTemplate(Action<T> codeBlockTemplate)
Parameters:codeBlockTemplateAction<T>

The template as a code block

Returns:

GridBuilder<T>

Example:
C#
@(@Page Inherits="System.Web.Mvc.ViewPage&lt;IEnumerable&lt;Product&gt;&gt;" )
@( Html.Kendo().Grid(Model)
.Name("grid")
.RowTemplate(product =&gt;
{
)
&lt;div&gt;Product Name: @( product.ProductName )&lt;/div&gt;
&lt;div&gt;Units In Stock: @( product.UnitsInStock )&lt;/div&gt;
(
})
)

Sets the server-side row template of the grid in Razor views.

C#
public GridBuilder<T> RowTemplate(Func<Grid<T>, Func<T, object>> inlineTemplate)
Parameters:inlineTemplateFunc<Grid<T>, Func<T, object>>

The template

Returns:

GridBuilder<T>

Example:
C#
@model IEnumerable&lt;Product&gt;
@(Html.Kendo().Grid(Model)
.Name("grid")
.RowTemplate(grid =&gt; @&lt;text&gt;
&lt;div&gt;Product Name: @product.ProductName&lt;/div&gt;
&lt;div&gt;Units In Stock: @product.UnitsInStock&lt;/div&gt;
&lt;/text&gt;)
)

Sets the server-side row template of the grid in Razor views.

C#
public GridBuilder<T> RowTemplate(Func<T, object> inlineTemplate)
Parameters:inlineTemplateFunc<T, object>

The template

Returns:

GridBuilder<T>

Example:
C#
@model IEnumerable&lt;Product&gt;
@(Html.Kendo().Grid(Model)
.Name("grid")
.RowTemplate(@&lt;text&gt;
&lt;div&gt;Product Name: @product.ProductName&lt;/div&gt;
&lt;div&gt;Units In Stock: @product.UnitsInStock&lt;/div&gt;
&lt;/text&gt;)
)

Enables grid scrolling.

C#
public GridBuilder<T> Scrollable()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Scrollable()
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the scrolling configuration of the grid.

C#
public GridBuilder<T> Scrollable(Action<GridScrollSettingsBuilder> configurator)
Parameters:configuratorAction<GridScrollSettingsBuilder>

The lambda which configures the scrolling

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Scrollable(scrolling =&gt; scrolling.Enabled(true))
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Configures the Kendo UI Grid search bar settings.

C#
public GridBuilder<T> Search(Action<GridSearchSettingsBuilder<T>> configurator)
Parameters:configuratorAction<GridSearchSettingsBuilder<T>>

The configurator for the search setting.

Returns:

GridBuilder<T>

Enables grid row selection.

C#
public GridBuilder<T> Selectable()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Selectable()
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the selection configuration of the grid.

C#
public GridBuilder<T> Selectable(Action<GridSelectionSettingsBuilder> configurator)
Parameters:configuratorAction<GridSelectionSettingsBuilder>

The lambda which configures the selection

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Selectable(selection =&gt; selection.Enabled(true))
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the size of the grid.

C#
public GridBuilder<T> Size(ComponentSize value)
Parameters:valueComponentSize

The size of the grid.

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Size(ComponentSize.Small)
.Pageable()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(10)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

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 GridBuilder<T> SmartBox(Action<GridSmartBoxSettingsBuilder<T>> configurator)
Parameters:configuratorAction<GridSmartBoxSettingsBuilder<T>>

The configurator for the SmartBox setting.

Returns:

GridBuilder<T>

Enables grid column sorting.

C#
public GridBuilder<T> Sortable()
Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Sortable()
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

Sets the sorting configuration of the grid.

C#
public GridBuilder<T> Sortable(Action<GridSortSettingsBuilder<T>> configurator)
Parameters:configuratorAction<GridSortSettingsBuilder<T>>

The lambda which configures the sorting

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("grid")
.Sortable(sorting =&gt; sorting.SortMode(GridSortMode.MultipleColumn))
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
)

The stacked layout settings of the Grid.

C#
public GridBuilder<T> StackedLayoutSettings(Action<GridStackedLayoutSettingsSettingsBuilder> configurator)
Parameters:configuratorAction<GridStackedLayoutSettingsSettingsBuilder>

The GridStackedLayoutSettingsSettingsBuilder for the stackedlayoutsettings setting.

Returns:

GridBuilder<T>

Returns the current instance of GridBuilder<T> .

Sets the status bar template for the grid.

C#
[Obsolete("This method is obsolete. Use StatusBarTemplate or StatusBarTemplateHandler overloads instead.")]
public GridBuilder<T> StatusBarTemplate(string template)
Parameters:templatestring

The template string for the status bar.

Returns:

GridBuilder<T>

Sets the status bar template for the grid using a template builder.

C#
public GridBuilder<T> StatusBarTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The template builder that defines the status bar template.

Returns:

GridBuilder<T>

Sets the name of the JavaScript function that will be used as the status bar template handler for the grid.

C#
public GridBuilder<T> StatusBarTemplateHandler(string template)
Parameters:templatestring

The name of the JavaScript function that will handle the status bar template.

Returns:

GridBuilder<T>

C#
public GridBuilder<T> TableHtmlAttributes(IDictionary<string, object> attributes)
Parameters:attributesIDictionary<string, object>Returns:

GridBuilder<T>

C#
public GridBuilder<T> TableHtmlAttributes(object attributes)
Parameters:attributesobjectReturns:

GridBuilder<T>

Sets toolbar template.

C#
public GridBuilder<T> ToolBar(Action template)
Parameters:templateAction

The action defining the template.

Returns:

GridBuilder<T>

Sets the toolbar template.

C#
public GridBuilder<T> ToolBar(Action<Grid<T>> template)
Parameters:templateAction<Grid<T>>

The action defining the template.

Returns:

GridBuilder<T>

Sets the toolbar configuration of the grid. Set the list of commands displayed in the Grid's Toolbar. Supports adding custom or built-in commands.

C#
public GridBuilder<T> ToolBar(Action<GridToolBarCommandFactory<T>> configurator)
Parameters:configuratorAction<GridToolBarCommandFactory<T>>

The lambda which configures the toolbar commands

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("Grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ToolBar(commands =&gt; commands.Create())
)

Sets the toolbar configuration of the grid. Supports adding custom or built-in commands, configuring the toolbar overflow settings and adaptive editing settings.

C#
public GridBuilder<T> ToolBar(Action<GridToolBarSettingsBuilder<T>> configurator)
Parameters:configuratorAction<GridToolBarSettingsBuilder<T>>

The lambda which configures the toolbar settings.

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;Product&gt;()
.Name("Grid")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Products_Read", "Home"))
)
.ToolBar(t=&gt;t
.Items(commands =&gt; {
commands.Create();
commands.Search();
})
.Overflow(overflow =&gt; overflow.Mode(ToolBarOverflowMode.Scroll))
.ShowInactiveTools(false)
)
)

Sets the toolbar template.

C#
public GridBuilder<T> ToolBar(Func<Grid<T>, object> template)
Parameters:templateFunc<Grid<T>, object>

The action defining the template.

Returns:

GridBuilder<T>

Sets toolbar template. When a String value is assigned to the toolbar configuration option, it will be treated as a single string template for the whole Grid toolbar and the string value will be passed as an argument to a kendo.template() function.

C#
public GridBuilder<T> ToolBar(string template)
Parameters:templatestring

The string template

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.ToolBar(t =&gt; t.Template("ToolbarTemplate"))
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Scrollable()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

Sets the toolbar template. Use the Template Component to configure the Toolbar.

C#
public GridBuilder<T> ToolBar<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The template component which contains the template.

Returns:

GridBuilder<T>

Sets the toolbar template. When a Function value is assigned (it may be a kendo.template() function call or a generic function reference), then the return value of the function will be used to render the Grid Toolbar contents.

C#
public GridBuilder<T> ToolBarClientTemplateHandler(string template)
Parameters:templatestring

The function handler which contains the template.

Returns:

GridBuilder<T>

Sets the width of the grid.

C#
public GridBuilder<T> Width(int pixelWidth)
Parameters:pixelWidthint

The width of the Grid

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Width(300)
.Scrollable()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)

Sets the width of the grid.

C#
public GridBuilder<T> Width(string value)
Parameters:valuestring

The width of the Grid

Returns:

GridBuilder<T>

Example:
C#
@(Html.Kendo().Grid&lt;OrderViewModel&gt;()
.Name("grid")
.Columns(columns =&gt;
{
columns.Bound(p =&gt; p.OrderID).Filterable(false);
columns.Bound(p =&gt; p.Freight);
})
.Width("300px")
.Scrollable()
.DataSource(dataSource =&gt; dataSource
.Ajax()
.PageSize(20)
.Read(read =&gt; read.Action("Orders_Read", "Grid"))
)
)
In this article
DefinitionConstructorsGridBuilder(Grid<T>)MethodsAdaptiveMode(AdaptiveMode)AI(Action<GridAiSettingsBuilder<T>>)AllowCopy(Action<GridAllowCopyBuilder>)AllowCopy(bool)AllowPaste()AllowPaste(bool)AutoBind(bool)BindTo(IEnumerable)BindTo(IEnumerable<T>)CellAction(Action<GridCell<T>>)ClientAltRowTemplate(Func<Grid<T>, string>)ClientAltRowTemplate(string)ClientAltRowTemplate<TModel>(TemplateBuilder<TModel>)ClientAltRowTemplateHandler(string)ClientDetailTemplate<TModel>(TemplateBuilder<TModel>)ClientDetailTemplateHandler(string)ClientDetailTemplateId(string)ClientDetailTemplateView(MvcHtmlString)ClientRowTemplate(Func<Grid<T>, string>)ClientRowTemplate(string)ClientRowTemplate<TModel>(TemplateBuilder<TModel>)ClientRowTemplateHandler(string)ColumnMenu()ColumnMenu(Action<GridColumnMenuSettingsBuilder>)ColumnResizeHandleWidth(int)Columns(Action<GridColumnFactory<T>>)ContextMenu()ContextMenu(Action<GridContextMenuBuilder>)DataLayoutMode(DataLayoutMode)DataSource(Action<DataSourceBuilder<T>>)DataSource(string)DetailTemplate(Action<T>)DetailTemplate(Func<T, object>)Editable()Editable(Action<GridEditingSettingsBuilder<T>>)Editable(GridEditMode)EnableCustomBinding(bool)EncodeTitles()EncodeTitles(bool)Events(Action<GridEventBuilder>)Excel(Action<GridExcelBuilder>)Filterable()Filterable(Action<GridFilterableSettingsBuilder>)Groupable()Groupable(Action<GridGroupingSettingsBuilder>)Height(int)Height(string)LoaderType(GridLoaderType)Messages(Action<GridMessagesBuilder>)Mobile()Mobile(MobileMode)Navigatable()Navigatable(Action<GridNavigatableSettingsBuilder>)NoRecords()NoRecords(Action<GridNoRecordsSettingsBuilder>)NoRecords(bool)NoRecords(string)Pageable()Pageable(Action<GridPageableSettingsBuilder>)Pdf(Action<PDFSettingsBuilder>)PersistSelection()PersistSelection(bool)Pinnable()Pinnable(Action<GridPinnableSettingsBuilder<T>>)Pinnable(bool)PinnedRowTemplate<TModel>(TemplateBuilder<TModel>)PinnedRowTemplateHandler(string)PrefixUrlParameters(bool)Reorderable(Action<GridReorderingSettingsBuilder>)Resizable(Action<GridResizingSettingsBuilder>)RowAction(Action<GridRow<T>>)RowTemplate(Action<T, Grid<T>>)RowTemplate(Action<T>)RowTemplate(Func<Grid<T>, Func<T, object>>)RowTemplate(Func<T, object>)Scrollable()Scrollable(Action<GridScrollSettingsBuilder>)Search(Action<GridSearchSettingsBuilder<T>>)Selectable()Selectable(Action<GridSelectionSettingsBuilder>)Size(ComponentSize)SmartBox(Action<GridSmartBoxSettingsBuilder<T>>)Sortable()Sortable(Action<GridSortSettingsBuilder<T>>)StackedLayoutSettings(Action<GridStackedLayoutSettingsSettingsBuilder>)StatusBarTemplate(string)StatusBarTemplate<TModel>(TemplateBuilder<TModel>)StatusBarTemplateHandler(string)TableHtmlAttributes(IDictionary<string, object>)TableHtmlAttributes(object)ToolBar(Action)ToolBar(Action<Grid<T>>)ToolBar(Action<GridToolBarCommandFactory<T>>)ToolBar(Action<GridToolBarSettingsBuilder<T>>)ToolBar(Func<Grid<T>, object>)ToolBar(string)ToolBar<TModel>(TemplateBuilder<TModel>)ToolBarClientTemplateHandler(string)Width(int)Width(string)
Not finding the help you need?
Contact Support