2X faster development
The ultimate WPF UI toolkit to boost your development speed.
The appearance of Summary cells (Table summary, Group summary and Caption summary) are customized by writing styles for those cells. SfDataGrid exposes the properties TableSummaryCellStyle, GroupSummaryCellStyle, CaptionSummaryCellStyle that customizes the appearance of the cell. Also SfDataGrid exposes the following properties to customize the appearance of summary cells conditionally.
Now you can learn how to change the horizontal alignment of summary cells for a particular columns only using StyleSelector properties exposed in SfDataGrid. Create a class deriving from StyleSelector and override SelectStyle method (When WinRT overrides SelectStyleCore method) and return styles based on condition. In the SelectStyle override method, you can access the Cell (for eg: GridTableSummaryCell) and from cell you can get the column details and customize the alignment based on column names. Refer the following code example. C#
The following TableSummaryStyle1 and TableSummaryStyle2 styles are returned to the Table Summary Cells based on the column name. Refer the following code example. XAML
The following TableSummaryCellStyleSelector property is used to customize the horizontal alignment of table summary cells. Refer the following code example. XAML
Refer the following screenshot for horizontal alignment of table summary cell customization.
In the above screenshot, horizontal alignment is set as center for Sales in Quarter1, Sales in Quarter2 table summary cells and right for other table summary cells. Sample Links:
|
2X faster development
The ultimate WPF UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.