# Using Virtualization with Grouping

Use virtual scrolling with grouped data to render the visible portion of a large grouped data set.

1. Set the [`groupable`](https://www.telerik.com/kendo-vue-ui/components/grid/api/gridprops#groupable) and [`group`](https://www.telerik.com/kendo-vue-ui/components/grid/api/gridprops#group) props of the Grid.
2. Set the [`scrollable`](https://www.telerik.com/kendo-vue-ui/components/grid/api/gridprops#scrollable) prop to `virtual`.
3. Handle the [`datastatechange`](https://www.telerik.com/kendo-vue-ui/components/grid/api/gridprops#ondatastatechange) event to update the data state when users scroll or change groups.

```vue
<Grid :groupable="true" :scrollable="'virtual'" :row-height="50" />
```

To programmatically implement the processing of the data, either:

* Send a request to the server to execute the grouping on the server side, or
* Use the [`process`](https://www.telerik.com/kendo-vue-ui/components/dataquery/api/process) method from the [Data Query library](https://www.telerik.com/kendo-vue-ui/components/dataquery) to process the data on the client.

The Grid expects grouped data as a collection of [`GroupResult`](https://www.telerik.com/kendo-vue-ui/components/dataquery/api/groupresult) items.

The following example demonstrates virtual scrolling with grouped data. It handles `datastatechange`, updates the data state, and processes the grouped result before passing it to the Grid.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/grid/grouping-virtual/source.txt)

## Suggested Links

* [Grouping Basics](https://www.telerik.com/kendo-vue-ui/components/grid/grouping)
* [Grid API Reference](https://www.telerik.com/kendo-vue-ui/components/grid/api/gridprops)
