Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
320
Win Grid Row Style
posted

I have created a InitializeRow method below. I use it to style rows in a grid based on the strings contained within the selected row. This works fine but the style is not applied if the row is highlighted, ibstead the original isl style is applied. Basically what i want to know is can i apply a style  like "Me.gridTillItems.DisplayLayout.Override.ActiveRowAppearance = VoidStyle" but just to the selected row using the InitializeRowEventArgs object

Private Sub gridTillItems_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles gridTillItems.InitializeRow

If e.Row.Cells("ItemName").Value.ToString.ToUpper.Contains("VOID") Then

             Dim VoidStyle As Infragistics.Win.Appearance = New Infragistics.Win.Appearance

            With VoidStyle
                .ForeColor = Color.Black
                .FontData.SizeInPoints = 10
                .FontData.Strikeout = DefaultableBoolean.True
            End With
           
            e.Row.Appearance = VoidStyle

End If

End Sub