Changing backColor for a row in gridDataBoundGrid

How can i change back color for a specific list of rows in a gridDataBoundGrid ?

1 Reply

AD Administrator Syncfusion Team January 27, 2003 02:58 PM UTC

Handle the PrepareViewStyleInfo event, and then set e.Style.BackColor depending upon the value of e.RowIndex.
    Private Sub GridDataBoundGrid1_PrepareViewStyleInfo(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs) Handles GridDataBoundGrid1.PrepareViewStyleInfo
        If e.RowIndex mod 2 = 1 Then
            e.Style.BackColor = Color.Blue

        End If
    End Sub

Loader.
Up arrow icon