Grid Grouping Control Capabilities
Thanks for your interest in Syncfusion products.
The reported behavior to achieve the grouped records collection summary is explained clearly in the following sample.
Code Snippet:
//Adding the SummaryRows to the TableDescriptor
this.gridGroupingControl1.TableDescriptor.SummaryRows.Add(new Syncfusion.Windows.Forms.Grid.Grouping.GridSummaryRowDescriptor("Row 1", new Syncfusion.Windows.Forms.Grid.Grouping.GridSummaryColumnDescriptor[] {
new Syncfusion.Windows.Forms.Grid.Grouping.GridSummaryColumnDescriptor("Won", Syncfusion.Grouping.SummaryType.Int32Aggregate, "wins", "{Sum}"),
new Syncfusion.Windows.Forms.Grid.Grouping.GridSummaryColumnDescriptor("Lost", Syncfusion.Grouping.SummaryType.Int32Aggregate, "losses", "{Sum}")}));
Sample Path: <InstalledLocation>\Syncfusion\EssentialStudio\<InstalledVersion>\Windows\Grid.Grouping.Windows\Samples\Summaries\Getting Started
Please let me know if you have any concerns.
Regards,
Arun.
Hi Ari,
We are sorry about the inconvenience caused.
We have analyzed your query and In WPF platform you can use SfDataGrid for grid grouping. Using SfDataGrid control you can achieve your requirement by using SfDataGrid.GroupSummaryRows. Please refer the below code snippet for achieving your requirement.
|
<syncfusion:SfDataGrid.GroupSummaryRows> <syncfusion:GridSummaryRow ShowSummaryInRow="False"> <syncfusion:GridSummaryRow.SummaryColumns> <syncfusion:GridSummaryColumn Name="OrderCount" Format="'{Sum:d}'" MappingName="OrderCount" SummaryType="Int32Aggregate"/> </syncfusion:GridSummaryRow.SummaryColumns> </syncfusion:GridSummaryRow> </syncfusion:SfDataGrid.GroupSummaryRows> |
Sample location: http://www.syncfusion.com/downloads/support/forum/119399/ze/SimpleApplication-1508516232
Please refer to the following UG link and find more details about summaries in SfDataGrid (WPF platform):
http://help.syncfusion.com/ug/wpf/index.html#!Documents/summaries.htm
Please let us know, if you require further assistance.
Thanks,
Ashok
Hi Ari,
We are sorry about the inconvenienced caused.
Internally we have loaded the content control in GridComboBoxColumn in non-editable (display) mode and while editing the cell only, ComboBox will be loaded. So you can achieve your requirement to display the drop down arrow in ComboBox column by customizing the GridCell style and set that CellStyle to GridComboBoxColumn. Please refer the below code example:
|
<Style x:Key="style1" TargetType="syncfusion:GridCell"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="syncfusion:GridCell"> <Grid SnapsToDevicePixels="True"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="IndicationStates"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True"> ------------------------------------------- ------------------------------------------- <Grid> <ContentPresenter Margin="{TemplateBinding Padding}" /> <Path Width="5.3" Height="4.2" Margin="0,0,7,0" HorizontalAlignment="Right" VerticalAlignment="Center" Data="F1M0,0L2.667,2.66665 5.3334,0 5.3334,-1.78168 2.6667,0.88501 0,-1.78168 0,0z" Fill="Gray" Stretch="Uniform" /> </Grid> </Border> ----------------------------------------- ---------------------------------------- </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> |
You can load the ComboBox in single click by setting EditTrigger as OnTap in SfDataGrid definition and set StaysOpenOnEdit as True in GridComboBoxColumn definition. For your reference we have attached the sample in the following location, please refer it.
Sample link: http://www.syncfusion.com/downloads/support/forum/119399/ze/ComboBox_WPF195330021
Please let us know if you require further assistance.
Thanks,
Ashok
Thank you for your update. Please let us know if you require any other assistance.
Regards,
Saranya
- 10 Replies
- 4 Participants
-
AC Ari Case
- Jun 16, 2015 01:54 PM UTC
- Jul 2, 2015 05:22 AM UTC