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
945
Group headers appearence
posted

 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

 

Parents
  • 469350
    Verified Answer
    Offline posted

    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.

Reply Children