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
630
Style for each Band, but when there is a default style
posted

We have a Style Library that has a default style for all UltraGrids; e.g.

    <styleSet name="Default" useOsThemes="False">

If I want to override this default style I simply set the StyleSetName property to a new style set; e.g.

    <styleSet name="UltraGrid_FieldView" useOsThemes="False">

    StyleSetName = "UltraGrid_FieldView"

 

My problem now is I want to be able to set a style for each band. Because there is a default style for all grids, I cannot seem to override the styles at band level; e.g.

    <styleSet name="UltraGrid_RailJourneys" useOsThemes="False">

    <styleSet name="UltraGrid_ucRailFaresGrid_TicketTypes" basedOn="UltraGrid_RailJourneys" useOsThemes="False">

    <styleSet name="UltraGrid_ucRailFaresGrid_Tickets" basedOn="UltraGrid_RailJourneys" useOsThemes="False">

 

            Const TICKETTYPES_STYLESET As String = "UltraGrid_ucRailFaresGrid_TicketTypes"

            Const TICKETS_STYLESET As String = "UltraGrid_ucRailFaresGrid_Tickets"

 

            ' Apple the complex styles to the bands (Infragistics do not expose the ability to set a style for a band).

            With Me.TicketTypes.Override

                .CellAppearance.StyleLibraryName = TICKETTYPES_STYLESET

                .RowAlternateAppearance.StyleLibraryName = TICKETTYPES_STYLESET

                .RowAppearance.StyleLibraryName = TICKETTYPES_STYLESET

            End With

            With Me.Tickets.Override

                .CellAppearance.StyleLibraryName = TICKETS_STYLESET

                .RowAlternateAppearance.StyleLibraryName = TICKETS_STYLESET

                .RowAppearance.StyleLibraryName = TICKETS_STYLESET

            End With

 

Any ideas how I can achieve my goal of keeping a default style for all the other grids in our application, and being able to assign each band in this grid with styles from the the ISL file?

 

Thanks, Phil