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

How to change the text of a GroupColumn in a GridData

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...


8 Replies

RA Rajasekar Syncfusion Team June 8, 2011 12:33 PM UTC

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





LR Lukas Reusch June 14, 2011 02:21 PM UTC

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



RA Rajasekar Syncfusion Team June 15, 2011 09:49 AM UTC

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




LR Lukas Reusch July 5, 2011 05:56 AM UTC

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.




RA Rajasekar Syncfusion Team July 7, 2011 06:57 AM UTC

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





GD Gareth Day May 15, 2013 10:27 AM UTC

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



GD Gareth Day May 15, 2013 10:57 AM UTC

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



RG Rajasekar G Syncfusion Team June 4, 2013 08:14 PM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon