We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Displaying GroupCaptionText and InColumnGroupCustomSummary

Hi,

When the SfDataGrid is showing groups, I need to display GroupCaption, and also custom caption summary inline the corresponding column. Please advise how  to display both GroupCaption and Column Summary on same caption summary line with GroupCaption in the beginning and column summary in corresponding column. 

I was able to get groupcaption using GroupCaptionTextFormat=" {Key}"
and was able to get inline custom caption summary using <sfusion: GridSummaryRow ShowSummaryInRow="False" TitleColumnCount="2" Title=" {GroupTotalSummaryColumn}". 

However i am not able to display both at same time on a GroupCaptionSummaryRow. Please advice

Thanks


11 Replies

RA Riyaj Ahamed I Syncfusion Team April 9, 2013 09:29 AM UTC

Hi Bhavani,

 

Thank you for contacting Syncfusion support.

 

We have analyzed your query and we regret to say that as of now we do not have the support to display the GroupCaptionText and GroupCaptionSummary at the same time. You can only display either GroupCaptionText or GroupCaptionSummary at the time. However instead of that you can use column based Group summaries, so that you can display GroupCaptionText and summary of the group at the same time.

 

To know more about the Group Summaries please refer the following link,

 

UG link: http://help.syncfusion.com/UG/winrt/default.htm#!Documents/groupsummaries.htm

 

Please let us know if you need further assistance.

 

Regards,

Riyaj Ahamed I


BS bhavani sangannagari April 9, 2013 02:23 PM UTC

When the groups are collapsed, I would like to see column summary along the group name. Expanding a group to see the custom summary, defeats the purpose of  allowing groups to collapse. 

Please let me know if this will be supported in any of your future releases.


RA Riyaj Ahamed I Syncfusion Team April 11, 2013 05:44 AM UTC

Hi Bhavani,

 

Thanks for your update.

 

As of now we do not have direct support for this requirement. However, you can display the GroupCaption and Inline Caption summary at the same time by applying the Custom style for GridCaptionSummaryCell with Converter. The following code snippet illustrates the custom style for GridCaptionSummaryCell,

 

[XAML]

 

  <Style TargetType="syncfusion:GridCaptionSummaryCell">

            <Setter Property="Template">

                <Setter.Value>

                    <ControlTemplate TargetType="syncfusion:GridCaptionSummaryCell">

                        <Border x:Name="PART_GridSummaryCellBorder"

                                Background="{TemplateBinding Background}"

                                BorderBrush="{TemplateBinding BorderBrush}"

                                BorderThickness="{TemplateBinding BorderThickness}">

                            <Grid VerticalAlignment="Center">

                                <Grid.ColumnDefinitions>

                                    <ColumnDefinition Width="188" />

                                    <ColumnDefinition Width="188" />

                                    <ColumnDefinition Width="188" />

                                    <ColumnDefinition Width="188" />

                                    <ColumnDefinition Width="188" />

                                    <ColumnDefinition Width="188" />

                                    <ColumnDefinition Width="188" />

                                </Grid.ColumnDefinitions>

                                <TextBlock Grid.Column="0"

                                           FontSize="16"

                                           Text="{Binding Path=DataContext,

                                                          Converter={StaticResource converter},

                                                          ConverterParameter=Caption,

                                                          RelativeSource={RelativeSource Mode=TemplatedParent}}" />

                                <TextBlock Grid.Column="3"

                                           FontSize="16"

                                           Text="{Binding Path=DataContext,

                                                          Converter={StaticResource converter},

                                                          ConverterParameter=Change,

                                                          RelativeSource={RelativeSource Mode=TemplatedParent}}" />

                                <TextBlock Grid.Column="5"

                                           FontSize="16"

                                           Text="{Binding Path=DataContext,

                                                          Converter={StaticResource converter},

                                                          ConverterParameter=Open,

                                                          RelativeSource={RelativeSource Mode=TemplatedParent}}" />

                            </Grid>

                        </Border>

                    </ControlTemplate>

                </Setter.Value>

            </Setter>

        </Style>

 

You can also check the sample for this requirement under the following location,

 

Sample: GridWithCaptionSummary.zip

 

Please let us know if you need further assistance.

 

Regards,

Riyaj Ahamed I



BS bhavani sangannagari April 11, 2013 08:26 PM UTC

Hi Riyaj

Thanks for reply.  Filtering by SfDataGrid when Grouped is not working. To easily reproduce modified a file from your sample as enclosed. 

Please advice.

Thanks


MainPage.xaml.cs_739bcfab.zip


PS Prakash Selvaraj Syncfusion Team April 12, 2013 07:10 AM UTC

Hi Bhavani,

 

We are able to reproduce the issue. We have logged an issue report regarding this. The fix will be available in our next release which is expected to be rolled by mid of May 2013.

 

Please let us know if you need further assistance.

 

Regards,

Prakash S.



AK Alex Korotin replied to Prakash Selvaraj January 20, 2015 05:26 PM UTC

Hi Bhavani,

 

We are able to reproduce the issue. We have logged an issue report regarding this. The fix will be available in our next release which is expected to be rolled by mid of May 2013.

 

Please let us know if you need further assistance.

 

Regards,

Prakash S.


Was this feature ever released  ? I have the same issue with SfGrid v.12.3400.0.36
I can only disply either Title or Column Summary, not both at the same time


AN Ashok N Syncfusion Team January 22, 2015 04:27 AM UTC

Hi Alex,

Query: Filtering issue


We have analyzed your query and the filtering issue has been fixed in our side, will you please conform on your side either  the filtering issue is fixed or not?

Query : Title and Column Summary displaying in same time

 We regret inform you that it is not possible to display the both Title and Column Summary in same time in our SfDataGrid because we have span all the cells in to single cell for displaying title.

Please let us know if you require further assistance.

Thanks,

Ashok.



HB Harald Betzler December 8, 2016 03:37 PM UTC

Hi,

I'm shocked, that you didn't realize this requirement within more than three years.

The "all-column-span" is the reason, why it didn't work. But this is not a valid reason to avoid improvements.

My question: could you please transform the sample GridWithCaptionSummary (provided on April 11, 2013) to WPF?

In my environment I'm not able to install Win8.1 or WinPhone support in Visual Studio.

Regards
Harald


JG Jai Ganesh S Syncfusion Team December 9, 2016 09:17 AM UTC

Hi Harald, 
We regret to inform you that, as of now we don’t have a direct support for showing GroupCaptionText and GroupCaptionSummary at the same time.  We already logged the feature request for this and this will be available in any of our upcoming release. Until then you can achieve this by using the work around and we have prepared a sample in WPF platform and please find it from below location, 
Regards, 
Jai Ganesh S 



AS Albrecht Swoboda February 3, 2019 03:21 PM UTC

Hi,

I checked your WPF sample for : Title and Column Summary displaying in same time, 
http://www.syncfusion.com/downloads/support/directtrac/general/ze/SfGridDemo-1648937052 .

It is exactly what I need, but I was not able to translate it for Winforms.
Can you provide a Winforms sample (c# or vb.net)

regards
Albrecht Swoboda


JN Jayaleshwari N Syncfusion Team February 4, 2019 11:57 AM UTC

Hi Albrecht, 
 
Thanks for using Syncfusion products. 
 
We have checked the reported query “Grouping Title and Column Summary displaying in same time” from our side. You can achieve your requirement by customizing GridCaptionSummaryCellRenderer. 
 
Code snippet C#: Key, ColumnName and ItemsCount from row data. 
 
public class CustomGridCaptionSummaryRenderer : GridCaptionSummaryCellRenderer 
{ 
    SfDataGrid dataGrid; 
    public CustomGridCaptionSummaryRenderer(SfDataGrid dataGrid) 
    { 
        this.dataGrid = dataGrid; 
    } 
    protected override void OnRender(Graphics paint, Rectangle cellRect, string cellValue, 
        CellStyleInfo style, DataColumnBase column, RowColumnIndex rowColumnIndex) 
    { 
        if (string.IsNullOrEmpty(cellValue)) 
            return; 
        var rowData = this.dataGrid.GetRecordEntryAtRowIndex(rowColumnIndex.RowIndex) as Group; 
        if(rowData is Group) 
        { 
            var key = rowData.Key; 
            var itemsCount = rowData.ItemsCount; 
            var columnName = dataGrid.GroupColumnDescriptions[rowData.Level - 1]; 
 
            cellValue = columnName + " - " + key + " - " + cellValue;                 
        } 
        base.OnRender(paint, cellRect, cellValue, style, column, rowColumnIndex); 
    } 
} 
  
We have attached the sample for your reference and you can download the same from the following location. 
 
Please let us know if you would require further assistance. 
 
Regards, 
Jayaleshwari N. 


Loader.
Live Chat Icon For mobile
Up arrow icon