Home Forums WinForms controls Xceed Grid for WinForms Gradients on Column headers

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #16779 |

    I’m trying to use gradients on column headers so I’m doing the following but it doesn’t work:


    columnManager = new ColumnManagerRow(); 


    new GradientStop(0, Color.SteelBlue));


    new GradientStop(.5, Color.White));


    new GradientStop(1, Color.SteelBlue));


    Imported from legacy forums. Posted by Bernard (had 2407 views)

    Diane [Xceed]
    Post count: 1353

    You need to specify that you will be overriding the default UI Style, and you should also be adding the row to the fixed headers (you need to clear the default content and re-add your own, otherwise you will end up with 2 column manager rows) :

    ColumnManagerRow columnManager = new ColumnManagerRow();

    columnManager.OverrideUIStyle = true;columnManager.GradientMap.GradientStops.Add(

    new GradientStop( 0, Color.SteelBlue ) );
    new GradientStop( 0.5, Color.White ) );
    new GradientStop( 1, Color.SteelBlue ) );

    detailStrikes.FixedHeaderRows.Add(new GroupByRow() );
    detailStrikes.FixedHeaderRows.Add( columnManager );

    Imported from legacy forums. Posted by Diane [Xceed] (had 568 views)

    User (Old forums)
    Post count: 23064

    Ok that fixed that.  Another question:

    On a row that has a detail grid, row.backcolor will set the rows back color and the color of the area that contains the detail grid.  Now i’ve switch the row to use a gradient e.g. row.GradientMap…. as I did with the column manager but I have to take out the row.BackColor to get the gradint on the row but then I lose the coloring of the background area that contains the detail grid (and the gradient appears for the row).  How can I get color back to the area the contains the detail grid (without losing the gradient in the row) or setup a separate gradient for that area?

    Imported from legacy forums. Posted by Bernard (had 368 views)

    User (Old forums)
    Post count: 23064

    Not sure I follow you explanation. What I understand is that you want the area containing the detail gird to be of one color, and the data rows of the detail grid to have a gradient style.  You already know how to set the data rows.  Have you tried setting the detail grid margins BackColor properties?


          detailGridTemplate1.SideMargin.BackColor = Color.DeepSkyBlue;
          detailGridTemplate1.TopMargin.BackColor = Color.DeepSkyBlue;
          detailGridTemplate1.BottomMargin.BackColor = Color.DeepSkyBlue;


    Imported from legacy forums. Posted by André (had 2803 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.