2017-06-18 23 views
0

我目前正在將我目前的DataGrid移植到Syncfusion數據網格SfDataGrid。但我不能找到相反的屬性DataGrid.GroupStyle這樣我就可以操縱這個代碼SfDataGrid控制:相當於DataGrid的SfDataGrid GroupStyle?

  <DataGrid.GroupStyle> 
        <GroupStyle> 
         <GroupStyle.ContainerStyle> 
          <Style TargetType="{x:Type GroupItem}"> 
           <Setter Property="Margin" Value="0,0,0,5"/> 
           <Setter Property="Template"> 
            <Setter.Value> 
             <ControlTemplate TargetType="{x:Type GroupItem}"> 
              <Expander IsExpanded="True" Foreground="Black" BorderBrush="#FF002255" BorderThickness="1,1,1,5"> 
               <Expander.Header> 
                <DockPanel> 
                 <TextBlock Text="{Binding Path=Name}" /> 
                 <TextBlock Grid.Column="1" Text="{Binding Path=ItemCount}"/> 
                </DockPanel> 
               </Expander.Header> 
               <Expander.Content> 
                <ItemsPresenter /> 
               </Expander.Content> 
              </Expander> 
             </ControlTemplate> 
            </Setter.Value> 
           </Setter> 
          </Style> 
         </GroupStyle.ContainerStyle> 
        </GroupStyle> 
       </DataGrid.GroupStyle> 

回答

0

@Mohamed, 您可以自定義「CaptionSummaryRowControl」在SfDataGrid集團的風格。作爲參考,您已經分享了文檔鏈接,如下所示。你可以請參考它。

https://help.syncfusion.com/wpf/sfdatagrid/styles-and-templates#styling-captionsummary

如果你想定製SfDataGrid單元格和行的GroupSummary,你可以使用下面的鏈接, https://help.syncfusion.com/wpf/sfdatagrid/styles-and-templates#styling-groupsummary

如果你想定製細胞TableSummary和SfDataGrid中的行,你可以利用下面的鏈接, https://help.syncfusion.com/wpf/sfdatagrid/styles-and-templates#styling-tablesummary

而且你也可以自定義在GroupDropArea SfDataGrid的,你可以利用下面的鏈接,

https://help.syncfusion.com/wpf/sfdatagrid/styles-and-templates#styling-groupdroparea

https://help.syncfusion.com/wpf/sfdatagrid/grouping#groupdroparea-height-and-appearance