Home Forums WinForms controls Xceed Grid for WinForms Hide Column Header/Footer Borders

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14769 |

    How can I hide the column header/footer borders?

    I can hide the row selector borders by overriding PaintBackground in the RowSelector and RowSelectorPane classes, but this didn’t work with the ColumnManagerRow class. Maybe I need to use a different class?

    I’m using the latest trial GridControl with c#.

    Thanks.

    Imported from legacy forums. Posted by Daniel (had 2491 views)

    User (Old forums)
    Member
    Post count: 23064

    I just noticed that I can pass a reference to my custom RowSelectorPane class to hide the Column Header/Footer’s RowSelector borders, but I still can’t hide the Column/Footer borders.

    Imported from legacy forums. Posted by Daniel (had 362 views)

    User (Old forums)
    Member
    Post count: 23064

    Ok, I got it to work by overriding ColumnManagerRow and ColumnManagerCell and overriding PaintBackground in both classes:

    public class ColumnTitle : ColumnManagerRow
    {
    public ColumnTitle()
    : base(new ShelfTitle())
    {}
    protected override Cell CreateCell(Column parentColumn)
    {
    return new ColumnTitleCell(parentColumn);
    }

    protected override void PaintBackground(GridPaintEventArgs e)
    {}
    }

    public class ColumnTitleCell : ColumnManagerCell
    {
    public ColumnTitleCell(Column parentColumn)
    : base(parentColumn)
    {}

    public ColumnTitleCell(ColumnTitleCell template)
    : base(template)
    { }

    protected override Cell CreateInstance()
    {
    return new ColumnTitleCell(this);
    }

    protected override void PaintBackground(GridPaintEventArgs e)
    {}
    }

    Imported from legacy forums. Posted by Daniel (had 3599 views)

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