Skip to main content
A newer version of this page is available. .

ColumnHeaderCustomDrawEventArgs.Info Property

Gets an object providing information necessary to paint a column header.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v19.1.dll

Declaration

public GridColumnInfoArgs Info { get; }

Property Value

Type Description
DevExpress.XtraGrid.Drawing.GridColumnInfoArgs

A DevExpress.XtraGrid.Drawing.GridColumnInfoArgs object providing appearance and state information about a column header.

Remarks

The returned object’s InnerElements property represents a collection of elements displayed within the painted column header (sort glyph, filter button and column header image). Each element is represented by a DevExpress.Utils.Drawing.DrawElementInfo object which enables you to obtain the element’s bounds. Elements can be recognized by the DevExpress.Utils.Drawing.DrawElementInfo.ElementPainter property type. See the GridCustomDraw demo for examples of using the InnerElements property.

The column header’s current state (normal, pressed or hot-tracked) can be obtained via the State property.

The CustomDrawObjectEventArgs.Painter object’s DrawObject method allows you to perform default element painting. This requires the Info property to be passed as the method’s parameter. You can change properties of the Info object before calling the DrawObject method. In this case, the element will be painted using new settings. Alternatively, you can change the Info object’s properties and leave the CustomDrawEventArgs.Handled property set to false. In this case, the element will also be painted using the new settings after executing the event handler.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Info property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also