Home › Forums › WinForms controls › Xceed Grid for WinForms › Colors in Cells in GroupByRow
-
AuthorPosts
-
#13260 |
Hello,
I have a grid with groups and sub groups (up to 6 levels).
Now I paint the groups in different colors according their level in the grid.
My question is: Can I paint the Cells in the GroupByRow in different colors,
according to depth level in the hirarcy of groups like in the grid.I tried the following:
Dim mCells() as Xceed.Grid.GroupByRow.GroupByCell = MyGroupByRow.GetCells()
But all properties in mCells are Readonly and I only can set the backcolor for all
cells and not individual.Is there a trick or workaround ?
Thanks in Advance
Regards
RobertImported from legacy forums. Posted by robert (had 5151 views)
No, there is no way to have different color for different cell in the GroupByRow. No clean work around exist to be able to do that. The only way will be to override the PaintForeground and repaint the cell the way you want at the same location that is returned by the GetCells() method.
Imported from legacy forums. Posted by Francois (had 396 views)
Hello Francois,
it’s a pity to hear this.
But anyway now I have sureness that theres no way,
an I don’t need to try ir anymore.Thanks for your statement.
Greetings
RobertImported from legacy forums. Posted by robert (had 400 views)
Hi Im new here so can u just tell me how to set color for groups alternately.
Imported from legacy forums. Posted by prem_rajani (had 322 views)
Hi,
when you only want to set the color of a group in the grid part (and not in the GroupByRow part) you can simply change the style by using the following properties
gridcontrol1.Groups(x).BackColor = …
gridcontrol1.Groups(x).ForeColor = …
gridcontrol1.Groups(x).Font = …Robert
Imported from legacy forums. Posted by robert (had 568 views)
Hi kleinR thanks for quick response. What u have replied is to set a group individually, which I know it. What I meant is how to set it alternateviley.
Dim group As New Group
group.GroupBy = “Table”
group.HeaderRows.Add(New GroupManagerRow)
GridControl1.GroupTemplates.Add(group)
GridControl1.UpdateGrouping()Using this code I get my data listed as a group. Suppose there are 4 groups, then first group should be lightblue, second should be lightgray, third again lightblue and fourth lightgray. Hope you are able to understand what I’m trying to say?
Imported from legacy forums. Posted by prem_rajani (had 491 views)
Hello,
if you like you can send me your email address to heiland.zack@web.de
then I will send you back a code snippet and a screenshot I used to do this.
regard robert
Imported from legacy forums. Posted by robert (had 347 views)
Hi thnks for your help. My id is prem@cyberneticsindia.com
Imported from legacy forums. Posted by prem_rajani (had 6412 views)
-
AuthorPosts
- You must be logged in to reply to this topic.