A newer version of this page is available. Switch to the current version.

WinExplorerView.CustomDrawGroupItem Event

Allows you to manually repaint specific WinExplorerView group captions.

Namespace: DevExpress.XtraGrid.Views.WinExplorer

Assembly: DevExpress.XtraGrid.v19.2.dll

Declaration

[DXCategory("CustomDraw")]
public event WinExplorerViewCustomDrawGroupItemEventHandler CustomDrawGroupItem

Event Data

The CustomDrawGroupItem event's data class is DevExpress.XtraGrid.Views.WinExplorer.WinExplorerViewCustomDrawGroupItemEventArgs.

Remarks

The WinExplorerView groups its items according to the WinExplorerViewColumns.GroupColumn property. Handle the CustomDrawGroupItem event to re-paint individual WinExplorerView group captions.

The code sample below paints group items' backgrounds with a solid red brush.

private void winExplorer1_CustomDrawGroupItem(object sender, DevExpress.XtraGrid.Views.WinExplorer.WinExplorerViewCustomDrawGroupItemEventArgs e) {
    e.Cache.FillRectangle(Brushes.Red, e.Bounds);
    e.DrawGroupCaption();
    e.DrawGroupCaptionButton();
    e.DrawGroupCaptionLine();
    e.Handled = true;
}
See Also