Skip to main content

WinExplorerView.CustomDrawGroupItem Event

Allows you to manually repaint specific WinExplorerView group captions.

Namespace: DevExpress.XtraGrid.Views.WinExplorer

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

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