How to customize the GroupDropArea in Silverlight DataGrid control?
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.
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.
The following screenshot displays the GroupDropArea in Expanded state by setting IsGroupDropAreaExpanded to true.
Sample Links: