# GridMessagesBuilder

## Methods

### NoRecords(System.String)

Sets the text that will be displayed when no records are present

#### Parameters

##### value - `System.String`

Defines the text of the "NoRecords" option that is rendered when no records are available in current view. The "NoRecords" options should be set.

#### RETURNS

Returns the current [GridMessagesBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/gridmessagesbuilder) instance for method chaining.

#### Example

```
 
            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID).Filterable(false);
                    columns.Bound(p => p.Freight);
                })
                .Messages(m => m.NoRecords("No records"))
                .NoRecords()
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )
              
```

### ExpandCollapseColumnHeader(System.String)

Sets the expand collapse column header message

#### Parameters

##### value - `System.String`

Allows the customization of the text in the column header for the expand or collapse columns.

#### RETURNS

Returns the current [GridMessagesBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/gridmessagesbuilder) instance for method chaining.

#### Example

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

### GroupHeader(System.String)

Sets the group header message

#### Parameters

##### value - `System.String`

Allows the customization of the text when grouping a header.

#### RETURNS

Returns the current [GridMessagesBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/gridmessagesbuilder) instance for method chaining.

#### Example

```
 
            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID).Filterable(false);
                    columns.Bound(p => p.Freight);
                })
                .Messages(m => m.GroupHeader("Group header"))
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )
              
```

### UngroupHeader(System.String)

Sets the ungroup header message

#### Parameters

##### value - `System.String`

Allows the customization of the text when ungrouping a header.

#### RETURNS

Returns the current [GridMessagesBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/gridmessagesbuilder) instance for method chaining.

#### Example

```
 
            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(p => p.OrderID).Filterable(false);
                    columns.Bound(p => p.Freight);
                })
                .Messages(m => m.UngroupHeader("Ungroup header"))
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(20)
                    .Read(read => read.Action("Orders_Read", "Grid"))
                )
            )
              
```

### AI(System.Action)

Sets the messages for the AI Assisstant

#### Parameters

##### configurator - System.Action<[GridMessagesAISettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/gridmessagesaisettingsbuilder)>

The action for configuring the messages

#### RETURNS

Returns the current [GridMessagesBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/gridmessagesbuilder) instance for method chaining.

### Commands(System.Action)

Sets the command messages of the Grid.

#### Parameters

##### configurator - System.Action<[GridMessagesCommandsSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/gridmessagescommandssettingsbuilder)>

The action for configuring the command messages.

#### RETURNS

Returns the current [GridMessagesBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/gridmessagesbuilder) instance for method chaining.

#### Example

```
 
            @(Html.Kendo().Grid<OrderViewModel>()
                .Name("grid")
                .AdaptiveMode(AdaptiveMode.Auto)
                .Messages(m => m.Commands(c => c.Add("Add item")))
                .Editable()
                .ToolBar(toolbar => toolbar.Create())
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .Model(model => model.Id(p => p.OrderID))
                    .Read(read => read.Action("Orders_Read", "Grid"))
                    .Create(create => create.Action("Orders_Create", "Grid"))
                )
            )
              
```
