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

Standard and Compact Styles

By default, the RadDataGrid is displayed with a low-density (or Standard) layout. However, you also have the option of displaying it with a high-density (or Compact) layout.

Compact Sizing

In order to switch to the compact sizing, you have to merge a ResourceDictionary containing the resources that enable the compact mode. Example 1 shows how to merge 2 ResourceDictionaries - one with the resources for the native WinUI controls and the other with the resources for the Telerik controls.

Example 1: Merging 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> 

Figure 1: RadDataGrid with Standard size

RadDataGrid with Standard size

Figure 2: RadDataGrid with Compact size

RadDataGrid with Compact size

See Also

In this article
Not finding the help you need?