Home Forums WinForms controls Xceed Grid for WinForms How do I create my own stylesheet?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17795 |

    You can create your own stylesheets by using StyleSheet class.

    Just create an instance of the class and set the properties to the colors, etc.. you want. Once that is done, call the grid’s ApplyStylesheet method with your stylesheet.

    Dim styleSheet As New StyleSheet()

    styleSheet.DataRows.Add(New VisualGridElementStyle())
    styleSheet.DataRows.Add(New VisualGridElementStyle())

    styleSheet.DataRows(0).BackColor = Color.Pink
    styleSheet.DataRows(1).BackColor = Color.Green

    ‘ Don’t forget to call the grid’s ApplyStyleSheet
    ‘ method so that the new styles are reflected
    ‘ in the grid.
    GridControl1.ApplyStyleSheet(styleSheet)

    For more information, you can refer to theDataRowTemplate Stylestopic in the help file.

    Imported from legacy forums. Posted by Xceed admin (had 1568 views)

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.