Alternating row colors work inconsistently on iOS

Hi, I'm writing a Xamarin.Forms app using the SfDataGrid and all released version seem to have an issue on iOS with alternating row colors. The alternating color only appears after the table has been scrolled down and then back up. They then appear correctly. It also doesn't display the selected row color correctly when selecting a row. Please see my DataGridStyle class attached. 

The colors are defined in the applications resource dictionary

   
       
            #FFEEEEEE
            #FFFFFFFF
            #FF000000
            #FF6FA8DC
            #FFCCCCCC

The DataGridStyle class returns the colors from the resource dictionary

    public class Custom_GridStyle : DataGridStyle
    {
        public override GridLinesVisibility GetGridLinesVisibility()
        {
            return GridLinesVisibility.Vertical;
        }

        public override Color GetBordercolor()
        {
            return (Color)Application.Current.Resources["tableForegroundColor"];
        }

        public override Color GetRecordForegroundColor()
        {
            return (Color)Application.Current.Resources["tableForegroundColor"];
        }

        public override Color GetAlternatingRowBackgroundColor()
        {
            return (Color)Application.Current.Resources["tableAltBackgroundColor"];
        }

        public override Color GetRecordBackgroundColor()
        {
            return (Color)Application.Current.Resources["tableBackgroundColor"];
        }

        public override Color GetHeaderBackgroundColor()
        {
            return (Color)Application.Current.Resources["tableHeaderBackgroundColor"];
        }

        public override Color GetHeaderForegroundColor()
        {
            return (Color)Application.Current.Resources["tableForegroundColor"];
        }

        public override Color GetSelectionForegroundColor()
        {
            return (Color)Application.Current.Resources["tableForegroundColor"];
        }

        public override Color GetSelectionBackgroundColor()
        {
            return (Color)Application.Current.Resources["tableSelectionColor"];
        }
    }

Any help or work around would be appreciated.

Thanks,

Brian

1 Reply

AN Ashok N Syncfusion Team October 23, 2017 12:58 PM UTC

Hi Brian, 
 
Thanks for contacting Syncfusion support. 
 
We have checked the reported GridStyle issue by customizing our SfDataGrid style based on your code snippet in Xamarin.Frorms.iOS with Xamarin.Forms v2.3.3.180 and SfDataGrid v15.3.0.33 but we are not able to reproduce the issue. Alternative row color and Selection color was applied properly. For your reference we have attached our sample in the below location, please check it. Could you please do revert us by modifying our sample to replicate the issue or share your sample along with replication procedure, also please share your both Xamarin.Forms and SfDataGrid product version, that would be more helpful for us to proceed further.     
  
  
Regards,  
Ashok  


Loader.
Up arrow icon