Let me first describe the situation I am trying to achieve. I would like a hierarchical display with separate fonts and style details set programmatically on each grouping header. There may be multiple columns being grouped. I am using only one Band so using the GroupByRowStyle does not work for my situation. I have tried using the InitializeGroupByRow event:
Private Sub USIGrid_InitializeGroupByRow(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.RowEventArgs) Handles Me.InitializeGroupByRowe.Row.Cells(0).Style.BackColor = Drawing.Color.Azuree.Row.Cells(0).Style.ForeColor = Drawing.Color.BlackEnd Sub
This was unsuccessful. I have also tried using a programmatic approach on the preRender event:
For Each objRow In aobjRowsIf TypeOf (objRow) Is Infragistics.WebUI.UltraWebGrid.GroupByRow ThenobjRow.Style.CssClass = String.EmptyobjRow.Style.CustomRules = CStr(aobjGroupFontInformation.Item(aintGroupByLevel))SetGroupByStyles(objRow.Rows, aobjGroupFontInformation, aintGroupByLevel + 1)End IfNextEnd Sub
This also does not work. I see that the row has the css values correctly in the object while rendering. However the grid reflects none of the style changes that I have made. Any suggestions?
Infragistics replied stating that hotfix 1053 will fix the issue. It seems to work in the sample application that I supplied.
Thanks,Kyle
I have made a simple webGrid application in which I can re-create the issue. Is this a desired affect of using an XML browser type? Is there a separate construct which needs to be used to set row styles when using the XML browser type or is this just a bug? We are currently using version 7.3.20073.38 of the Infragistics webGrid.
Jdukich, Thanks for the recommendation. However, I have already tried the same code and it does not function as anticipated. I have figured out the problem though! In our initialize we have our browser configuration set to "BrowserLevel.XML" to use some of the client-side rendering capabilities. If this is switched to auto, the code I posted earlier works perfectly (my guess is that it defaults to the "compatability" setting). However, when it is rendered using the XML browser level, the styles are not rendered. Any suggestions?
I needed to set the entire GroupByRow to a specific color. In the grid_InitializeGroupByRow event:
e.Row.Style.BackColor = color.blue
e.Row.Style.ForeColor = color.white
Hope this helps.