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.
Unfortunately, activation email could not send to your email. Please try again.

How to change the text of a GroupColumn in a GridData

Thread ID:

Created:

Updated:

Platform:

Replies:

99717 Jun 7,2011 05:20 AM Jun 4,2013 04:14 PM WPF 8
loading
Tags: GridControl
Lukas Reusch
Asked On June 7, 2011 05:20 AM

Hello,

at the moment the text in my GroupColumn is:

Group : XXXXXXXX - XX items


Is it possible to change it to:


XXXXXXXXXX (XX results)


Thank you...


Rajasekar [Syncfusion]
Replied On June 8, 2011 08:33 AM

Hi Peter,

Thanks for using Syncfusion products.

Yes you can customize the grouped column caption text by using Caption Summary Row as shown below,

Code Snippet[XAML]










To display the grouped column name in the Caption title you may use the following line of code.



To display the group value in the Caption title you may use the following line of code.



To display the the records count in the Caption title you may use the following line of code.



For your reference we have prepared the sample, please find the sample in the below location,

Sample: < http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=CS-1601456562.zip >

Please let us know if you need any more details.

Thanks
Rajasekar




Lukas Reusch
Replied On June 14, 2011 10:21 AM

Hello,

It worked very fine.

But now I updated from the Version 8.2... to the newest and now the text of the GroupRow is the same as at the beginning

Group: XXXXX - X items

Any idea why?


Thank you for your help,
Peter


Rajasekar [Syncfusion]
Replied On June 15, 2011 05:49 AM

Hi Peter,

Thank you for your update.

By default in all the version, after grouping any GridDataVisibleColumn of the GridDataControl, the grouped column caption will be like this,

XXXXXXXX - XX items

But, you can customize the grouped column caption to your desired format by using the previous update syntax as like this,

XXXXXXXXXX (XX results) or XX results etc.

Please let us know if you have any queries.

Thanks,
Rajasekar



Lukas Reusch
Replied On July 5, 2011 01:56 AM

At the moment my xaml looks like this:

ItemsSource="{Binding ResultsToShow}"
SelectedItem="{Binding SelectedResult}"
AutoPopulateColumns="False"
AutoPopulateRelations="False"
ShowAddNewRow="True"
ShowGroupDropArea="True">

























But it doesn't show any groups.



Rajasekar [Syncfusion]
Replied On July 7, 2011 02:57 AM

Hi Lukas,

Thank you for your update.

In your case, you are use Mapping Name as "Group" in the GridDataSummaryColumn, but there is no mapping name like that in your VisibleColumns,




For your reference, Please ensure the below things,

1.You need to set ShowGroupDropArea as True.



2.For default grouping, use the below code snippet,





3.For Summary Row, use the below code snippet










The mapping name set in the GridDataSummaryColumn should be available in the VisibleColumns.

Please let us know if you have any queries.

Thanks,
Rajasekar




Gareth Day
Replied On May 15, 2013 06:27 AM

I am trying to do the same thing but when I try the code provided I get this error in Blend and VS2012 at the following line

<syncfusion:GridDataSummaryRow.SummaryColumns>

Error: The Member SummaryColumns is not recognized or is not accessible


Gareth Day
Replied On May 15, 2013 06:57 AM

I just opened the included sample you created and that opens fine, however I have noticed that an extra property is visible in both blend and visual studio called SummaryColumns. Why is this property not visible in my project? I am using a GridDataControl and the latest version dll's


Rajasekar G [Syncfusion]
Replied On June 4, 2013 04:14 PM

Hi Gareth,

 

Thank you for your update.

 

We have tested the reported issue in our sample but we are not able to replicate the issue in our end. We suspect in this case you have use the Summary Columns directly from GridDataSummary row. You have to use the Summary Columns like below code snippet to meet your requirement.

 

Code Snippet[XAML]:

<syncfusion:GridDataControl.CaptionSummaryRow>

        <syncfusion:GridDataSummaryRow ShowSummaryInRow="True" Title="Total Freight: {FreightSummary} For {CountSummary} Items"                   TitleColumnCount="2">

            <syncfusion:GridDataSummaryRow.SummaryColumns>

                <syncfusion:GridDataSummaryColumn Name="FreightSummary" MappingName="Freight" SummaryType="Int32Aggregate"

                Format="'{Sum:c}'" />

                <syncfusion:GridDataSummaryColumn Name="CountSummary" MappingName="OrderDate" SummaryType="CountAggregate"

                Format="'{Count:d}'" />

            </syncfusion:GridDataSummaryRow.SummaryColumns>

        </syncfusion:GridDataSummaryRow>

    </syncfusion:GridDataControl.CaptionSummaryRow>

 

 

 

For your more information please refer the documentation from the following location.

 

Documentation Link: http://help.syncfusion.com/ug/wpf/grid/default.htm#!documents/groupsummaries.htm

 

Please let us know if you have any questions.

 

Regards,

Rajasekar


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;