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