I want to give a different format to some rows (based on a property of the databound items). It works good, but some rows decide, on they own, to use a special format.
If I use only one BackColor and a solid GradientStyle, the problem do not appear (but linear Gradient looks far better. Isn't it?)
Should I have miss something or it's bug ?
Private Sub dgv_Clients_RowFormatting(sender As System.Object, e As Telerik.WinControls.UI.RowFormattingEventArgs) Handles dgv_Clients.RowFormatting
Dim ClientBound As Client = TryCast(e.RowElement.Data.DataBoundItem, Client)
If ClientBound IsNot Nothing AndAlso Helper.ActiveDirectoryHelper.GetInstance.GetCurrentUser.Guid.Equals(ClientBound.FK_OwnerUser) Then
e.RowElement.DrawFill = True
e.RowElement.BackColor = Color.Red
e.RowElement.BackColor2 = Color.White
e.RowElement.BackColor3 = Color.White
e.RowElement.BackColor4 = Color.White
e.RowElement.GradientStyle = GradientStyles.Linear
e.RowElement.GradientAngle = 360
Else
e.RowElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local)
e.RowElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local)
e.RowElement.ResetValue(LightVisualElement.BackColor2Property, ValueResetFlags.Local)
e.RowElement.ResetValue(LightVisualElement.BackColor3Property, ValueResetFlags.Local)
e.RowElement.ResetValue(LightVisualElement.BackColor4Property, ValueResetFlags.Local)
e.RowElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local)
e.RowElement.ResetValue(LightVisualElement.GradientAngleProperty, ValueResetFlags.Local)
End If
End Sub