How to change the text of a GroupColumn in a GridData
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...
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
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
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
SelectedItem="{Binding SelectedResult}"
AutoPopulateColumns="False"
AutoPopulateRelations="False"
ShowAddNewRow="True"
ShowGroupDropArea="True">
But it doesn't show any groups.
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
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
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
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
- 8 Replies
- 4 Participants
-
LR Lukas Reusch
- Jun 7, 2011 09:20 AM UTC
- Jun 4, 2013 08:14 PM UTC