Hi:
I am trying to set the group headers border color:
Grid.DisplayLayout.Bands[0].Columns[1].Group.Header.Appearance.BackColor = Color.Red; Grid.DisplayLayout.Bands[0].Columns[1].Group.Header.Appearance.BorderColor = Color.DodgerBlue;
BackColor gets set, BorderColor3DBase gets set, borders color doesn't. I tried ResolveAppearence, same result. Can you set the border colors for a group header? I just want the border colors, BackColor is here as an example only.My intention is to mimic hovering the mouse over the group headers. I also tried:
View.SmartGridExcel.DisplayLayout.Bands[0].Columns[1].Group.Header.Selected = true;
hoping to get the header selected but I am getting the whole column selected instead.
Any ideas on how to achieve this (showing a group header as been selected/hovering over programmatically)?
Thanks,
Mihail
As I said,a header only draws 1 or two sides, so it's not really possible to do this via a property setting.
The only thing you could do is use a DrawFilter and draw the borders yourself. But determining which borders to draw and where would be very complex.
I want to set ALL 4 borders for the specific group header either by color or just "bold" them. It seems that (BorderColor3Base in my case) will work as you are saying - draws the right and bottom border of the header. I will need somehow to draw the left and upper border also for the header borders. The borders need to stay (either color or bold) until I will click on a different header. I was able to get the behavior with the background color for the header not with the borders(and I can see now why). So, is it there a way to do this - maybe setting the borders on the adjascent cell/header? It seems to me that setting the border on the current header sets right and bottom sides, will the previous cell(on the left) border will set (right should work I guess) but don't know if upper side border will be set?
Hi Mihail,
You lost me a little bit here:
mfaina said:BackColor gets set, BorderColor3DBase gets set, borders color doesn't.
What does that mean? If BorderColor3DBase is working, why not just use that?
The headers will use either BorderColor3DBase or BorderColor depending on the style of the borders - if they are 3d or not.
Anyway, I suspect that what you are trying to do here will not work in any case. Setting the BorderColor on an individual object in the grid will almost never give you the results you want, because the header does not draw all 4 of it's own borders. Most objects in the grid like headers and cells only draw 1 or two border sides, and rely on the adjascent objects to draw their borders. Otherwise, there would be double-thick borders between every two cells or every two headers.