Articles in this section
Category / Section

How to customize the GroupDropArea in WinRT DataGrid control?

1 min read

You can customize GroupDropArea appearance by writing style for GroupDropArea. In style, GroupDropArea Height is changed by setting Height property and GroupDropArea text is changed by setting GroupDropAreaText property.

Refer the following code example.

XAML

 <Style TargetType="syncfusion:GroupDropArea">
     <Setter Property="Height" Value="80"/>
     <Setter Property="BorderThickness" Value="1,1,1,0"/>
     <Setter Property="Background" Value="LightGray"/>
     <Setter Property="Foreground" Value="Red"/>
     <Setter Property="FontSize" Value="20"/>
     <Setter Property="FontWeight" Value="Bold"/>
   <Setter Property="GroupDropAreaText" Value="Grouped Columns Here "/>
 </Style>

 

Here the Height is set as 80 for GroupDropArea and GroupDropAreaText is set as Grouped Columns. You can change the appearance of GroupDropArea by setting Background, Foreground, FontSize, properties etc.

The following screenshot displays the customized GroupDropArea.

F:\KB\Images\Group.png

To display the GroupDropArea in Expanded State while loading

By default, GroupDropArea is in collapsed state when loading the SfDataGrid. By setting IsGroupDropAreaExpanded property to true, you can display the GroupDropArea in expanded state while loading. Refer the following code example.

XAML

<syncfusion:SfDataGrid x:Name="dataGrid" 
                        ItemsSource="{Binding Path=OrdersDetails}"
                        AllowDraggingColumns="True"
                        ShowGroupDropArea="True"
                        IsGroupDropAreaExpanded="true"
                        AllowGrouping="True"                              
                        ColumnSizer="Star">
</syncfusion:SfDataGrid>

 

The following screenshot displays the default GroupDropArea in Collapsed state.

F:\KB\Images\GroupDrop.png

 

The following screenshot displays the GroupDropArea in Expanded state by setting IsGroupDropAreaExpanded to true.

F:\KB\Images\Group.png

Sample Links:

WPF

WinRT

SilverLight

UWP

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied