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
close icon

Conditional styling of caption summary row based on mappigname

Good morning,

in WPF sfdatagrid documentation I found

Conditional styling of caption summary row based on group level

 public override Style SelectStyle(object item, DependencyObject container)
        var dataRow = item as DataRowBase;
        var level = dataRow.Level;

        //based on group levels, style applied to CaptionSummaryRow

        if (level == 1)
            return App.Current.Resources["rowStyle1"] as Style;

        else if (level == 2)
            return App.Current.Resources["rowStyle2"] as Style;

        else if (level == 3)
            return App.Current.Resources["rowStyle3"] as Style;
        return base.SelectStyle(item, container);

Is it possible to base the condition on mappingname? And How?
Thank You in advance,
Best regards

1 Reply

FP Farjana Parveen Ayubb Syncfusion Team September 11, 2019 12:10 PM UTC

Hi Marco, 
Thank you for using Syncfusion controls. 
You can able to apply the style for CaptionSummaryRow based on mapping name by customizing the GridCaptionSummaryCell in SfDataGrid. 
Please refer the below UG link, 
Please let us know if you need any further details on this. 
Farjana Parveen A 

Live Chat Icon For mobile
Up arrow icon