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

How to group by First Initial of a particular column value rather than the whole column value?

Thread ID:





148368 Oct 16,2019 09:35 PM UTC Nov 12,2019 09:50 AM UTC Xamarin.Forms 4
Tags: SfDataGrid
Asked On October 16, 2019 09:35 PM UTC

Karthikraja Kalaimani [Syncfusion]
Replied On October 17, 2019 02:03 PM UTC

Hi Huzefa,

Thanks for contacting Syncfusion support.

We have prepared sample for your requirement by using GroupColumnDescription.Converter in SfDataGrid. In that sample we have grouped based on Initial letter of CustomerName column.

Please refer the below code example. 
            GroupColumnDescriptions.Add(new GroupColumnDescription() 
                ColumnName = "Freight"
                Converter = new GroupConverter() 
      public class GroupConverter : IValueConverter 
            public GroupConverter() 
            public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 
                var orderInfo = value as OrderInfo; 
                var name = orderInfo.FirstName; 
                var firstLetter = name.First().ToString(); 
                return firstLetter; 
            public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 
                return null; 
We hope this helps, please let us know if need further assistance from us.

Karthik Raja

Replied On November 12, 2019 12:53 AM UTC

Replied On November 12, 2019 12:54 AM UTC

Thanks Karthink.

Farjana Parveen Ayubb [Syncfusion]
Replied On November 12, 2019 09:50 AM UTC

Hi Huzefa 
Thanks for the update. 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
Farjana Parveen A 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon