Hi:
I am having an issue with "changing the selected line color", which was replied earlier in the forums.
I am doing the same as explained here, but the background color does not change while the text of the line changes.
private void rgvCompanyList_ViewRowFormatting(object sender, RowFormattingEventArgs e)
{
if (e.RowElement.IsSelected && e.RowElement.IsCurrent)
{
e.RowElement.DrawFill = true;
e.RowElement.GradientStyle = GradientStyles.Solid;
e.RowElement.BackColor = Color.Black; // It doesn't work !
e.RowElement.ForeColor = Color.White; // It works
// e.RowElement.NumberOfColors = 1; that didn't work either
}
else
{
e.RowElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local);
// e.RowElement.ResetValue(LightVisualElement.NumberOfColorsProperty, ValueResetFlags.Local);
}
}