Welcome to the Xceed Community | Help
Community Search  
More Search Options

How do I create my own stylesheet?

Sort Posts: Previous Next
  •  10-09-2008, 1:40 PM Post no. 28239

    How do I create my own stylesheet?

    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.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.