Who to change the row appearance in one specific grid when i'm using
Infragistics.Win.AppStyling.StyleManager.Load(
"Office2007Blue2.isl")
for my application.
Sorry, the property name is "StyleResourceName".
If it's not there, then it may have been added in a later version.
I don't see the property StyleLibraryResourceName.
e.Row.Band.Layout.Bands(1).Override.RowAppearance.StyleLibraryResourceName = "The name of the resource";My Infragistics Version is 6.3
An ApplicationStyle has no notion of a band. It only knows about UIRoles. It can't distinguish between one band and another.
If you want to set up the appearance of a band inside the ApplicationStyle, then what you would do is use a Resource. Create a resource in the isl file and give it a name.
Then, in your code, you can assign that resource to any appearance property. So you could apply that appearance to the second band in the grid using something like this:
e.Row.Band.Layout.Bands(1).Override.RowAppearance.StyleLibraryResourceName = "The name of the resource";
Can you tell me how to do the change in a applicationstyle for a second band?
I try this in the rowInitialize event and doesn't work.
e.Row.Band.Layout.Bands(1).Override.RowAppearance.BackColor = Color.Red
but this work for both bands
e.Row.Appearance.BackColor = System.Drawing.Color.GreenYellow
, but what i looking is to change the appearancerow only in the second band.
Thank you.
marenas said:Thank you. And how can I change the row apperance for 2nd band?
An entire band is a different matter. AppStylist is designed to style a whole application. So any styling done to an individual object, such as a single row, is outside the scope of Application Styling and so the row appearance takes precedence over the Application Style.
In the case of a band, I'm not sure if this will work. Normally, to apply appearances to a single band, you would use band.Override.RowAppearance. I'm not sure if this will work with an application style applied, though. It's not clear which appearance will take precedence.
If it doesn't work, then you could use the InitializeRow event to set the appearance of each row in the band to the appearance you want.
Or, you could create a resource in your application style (isl) file and apply it to the band using band.Override.RowAppearance.StyleResourceName