Articles in this section
Category / Section

How to customize GroupCaptionTextFormat in .NET MAUI DataGrid (SfDataGrid)?

2 mins read

The .NET MAUI DataGrid allows for customization of the GroupCaptionTextFormat of the CaptionSummaryRows. By default, the group caption text follows the format “{ColumnName} : {Key} - {ItemsCount} Items.” You have the option to personalize this text format by adjusting the SfDataGrid.GroupCaptionTextFormat property.

Please consult the provided code example below, which demonstrates how to customize the group caption text in the SfDataGrid.

Xaml
<syncfusion:SfDataGrid x:Name="datagrid"
                      ColumnWidthMode="Auto"
                      GroupCaptionTextFormat="{}{ColumnName}: {Key}"
                      ItemsSource="{Binding Employees}">
   <syncfusion:SfDataGrid.GroupColumnDescriptions>
       <syncfusion:GroupColumnDescription ColumnName="Name">
       </syncfusion:GroupColumnDescription>
   </syncfusion:SfDataGrid.GroupColumnDescriptions>
</syncfusion:SfDataGrid>

Executing the code example above yields the following output.

Download the complete sample from GitHub

Conclusion

I hope you enjoyed learning how to customize GroupCaptionTextFormat in .NET MAUI DataGrid (SfDataGrid).

You can refer to our .NET MAUI DataGrid feature tour page to learn about its other groundbreaking feature representations. Explore our .NET MAUI DataGrid Documentation to understand how to present and manipulate data.
For current customers, check out our .NET MAUI components on the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to explore our .NET MAUI DataGrid and other .NET MAUI components.

Please let us know in the comments section if you have any queries or require clarification. You can also contact us through our support forums, Direct-Trac or feedback portal, or the feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied