# Grouping

To request grouped data on initial load, configure the groups in the [`GroupDescriptorFactory`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/datasourcegroupdescriptorfactory). the `ToDataSourceResult()` extension method will return only the grouped data in the response object.

* The `Group` method sets the initial groups.

```Razor HtmlHelper
    @(Html.Kendo().DataSource<ProductViewModel>()
        .Name("myDataSource")
        .Ajax(datasource => datasource
            .Read(read => read.Action("Products_Read", "Home"))
            .Group(groups =>
            {
                groups.Add(product => product.UnitPrice);
                groups.Add(product => product.ProductName);
            })
        )
    )
```

## See Also

* [Server-Side API](https://www.telerik.com/aspnet-mvc/documentation/api/datasource)
