Home Forums WinForms controls Xceed Grid for WinForms Remove sort indicator image from column header. Reply To: Remove sort indicator image from column header.

User (Old forums)
Member
Post count: 23064

You will need to derive from the ColumnManagerRow and ColumnManagerCell to accomplish this.

Since the paint is done through layers, it should look ok, except that you will loose the cells borders. If you want them, you will need to paint them manually by overriding PaintBorders of ColumnManagerCell.

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

protected MyColumnManagerCell( MyColumnManagerCell template )
: base( template )
{
}

protected override void PaintBackground( GridPaintEventArgs e )
{
}

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

}

public class MyColumnManagerRow : ColumnManagerRow
{
public MyColumnManagerRow()
{

}

protected MyColumnManagerRow( MyColumnManagerRow template )
: base( template )
{
}

protected override Row CreateInstance()
{
return new MyColumnManagerRow( this );
}

protected override Cell CreateCell( Column parentColumn )
{
return new MyColumnManagerCell( parentColumn );
}

}

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