windowsforms-devexpress-dot-xtragrid-dot-views-dot-winexplorer-dot-winexplorerview-084847de.md
Allows you to manually repaint specific WinExplorerView group captions.
Namespace : DevExpress.XtraGrid.Views.WinExplorer
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DXCategory("CustomDraw")]
public event WinExplorerViewCustomDrawGroupItemEventHandler CustomDrawGroupItem
<DXCategory("CustomDraw")>
Public Event CustomDrawGroupItem As WinExplorerViewCustomDrawGroupItemEventHandler
The CustomDrawGroupItem event's data class is DevExpress.XtraGrid.Views.WinExplorer.WinExplorerViewCustomDrawGroupItemEventArgs.
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;
}
Private Sub winExplorer1_CustomDrawGroupItem(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.WinExplorer.WinExplorerViewCustomDrawGroupItemEventArgs
e.Cache.FillRectangle(Brushes.Red, e.Bounds)
e.DrawGroupCaption()
e.DrawGroupCaptionButton()
e.DrawGroupCaptionLine()
e.Handled = True;
End Sub
See Also