Home Forums WinForms controls Xceed Grid for WinForms How to change color of selected rows in child grids?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17510 |

    I have tried numerous things to set the background color of selected rows but nothing seems to work…

    Am i missing something?

    Private Sub GridControl1_InitializingDetailGrid(ByVal sender As Object, ByVal e As Xceed.Grid.InitializingDetailGridEventArgs) Handles GridControl1.InitializingDetailGrid

    On Error Resume Next

    e.Grid.BeginInit()
    e.Grid.SelectionVisualStyle.ForeColor = Color.White
    e.Grid.SelectionVisualStyle.BackColor =
    Color.DarkBlue
    e.Grid.DataSource = DS.Tables(parentTaskName)
    e.Grid.SelectionBackColor = Color.DarkBlue
    e.Grid.SelectionForeColor =
    Color.White
    e.Grid.ReadOnly = True
    e.Grid.EndInit()

    End Sub

    Imported from legacy forums. Posted by S. (had 1113 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi S,

    On SelectionVisualStyle, you must set OverrideUIStyle to True to indicate that the theme must not take its look, but instead let your settings go through.

     

    Imported from legacy forums. Posted by Diane [Xceed] (had 1405 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.