New to Telerik UI for WinUI? Download free 30-day trial

Standard and Compact Styles

By default, the DataGrid is displayed with a low-density (or Standard) layout. However, you can also display it with a high-density (or Compact) layout.

Compact Sizing

To switch to the compact sizing feature, merge a ResourceDictionary containing the resources that enable the compact mode. The following example shows how to merge two ResourceDictionaries—one with the resources for the native WinUI controls and the other with the resources for the Telerik controls.

Merge the Compact ResourceDictionaries

<Page.Resources> 
    <ResourceDictionary> 
        <ResourceDictionary.MergedDictionaries> 
            <ResourceDictionary Source="ms-appx:///Microsoft.UI.Xaml/DensityStyles/Compact.xaml" /> 
            <ResourceDictionary Source="ms-appx:///Telerik.WinUI.Controls/DensityStyles/Compact.xaml" /> 
        </ResourceDictionary.MergedDictionaries> 
    </ResourceDictionary> 
</Page.Resources> 
DataGrid with a Standard Size

RadDataGrid with Standard size

DataGrid with a Compact Size

RadDataGrid with Compact size

See Also

In this article
Not finding the help you need?