windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-customdrawobjecteventargs.md
Gets an object containing information about the painted element.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
public ObjectInfoArgs Info { get; }
Public ReadOnly Property Info As ObjectInfoArgs
| Type | Description |
|---|---|
| DevExpress.Utils.Drawing.ObjectInfoArgs |
A DevExpress.Utils.Drawing.ObjectInfoArgs object providing information about the painted element.
|
The Info property can be used to:
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.
winforms-grid-keep-groups-expanded/CS/KeepGroupsExpanded/Form1.cs#L26
DevExpress.XtraGrid.Views.Grid.ViewInfo.GridGroupRowInfo info;
info = e.Info as DevExpress.XtraGrid.Views.Grid.ViewInfo.GridGroupRowInfo;
info.ButtonBounds = Rectangle.Empty;
winforms-grid-multiple-row-selection-web-style-checkboxes/CS/E1271/CheckMarkSelection.cs#L238
void View_CustomDrawGroupRow(object sender, RowObjectCustomDrawEventArgs e) {
GridGroupRowInfo info = e.Info as GridGroupRowInfo;
info.GroupText = " " + info.GroupText.TrimStart();
e.Appearance.FillRectangle(e.Cache, e.Bounds);
e.Painter.DrawObject(e.Info);
}
private void gridView1_CustomDrawGroupRow(object sender, DevExpress.XtraGrid.Views.Base.RowObjectCustomDrawEventArgs e) {
GridGroupRowInfo info = (GridGroupRowInfo)e.Info;
if(info.Column.FieldName == "Discontinued") {
winforms-grid-display-custom-rows/CS/CustomRowInGrid/CustomRowInGrid/Form1.cs#L112
{
GridGroupRowInfo info = e.Info as GridGroupRowInfo;
info.GroupText = "Custom Rows";
winforms-grid-keep-groups-expanded/VB/KeepGroupsExpanded/Form1.vb#L28
Dim info As DevExpress.XtraGrid.Views.Grid.ViewInfo.GridGroupRowInfo
info = TryCast(e.Info, DevExpress.XtraGrid.Views.Grid.ViewInfo.GridGroupRowInfo)
info.ButtonBounds = Rectangle.Empty
winforms-grid-multiple-row-selection-web-style-checkboxes/VB/E1271/CheckMarkSelection.vb#L279
Private Sub View_CustomDrawGroupRow(ByVal sender As Object, ByVal e As RowObjectCustomDrawEventArgs)
Dim info As GridGroupRowInfo = TryCast(e.Info, GridGroupRowInfo)
info.GroupText = " " & info.GroupText.TrimStart()
e.Appearance.FillRectangle(e.Cache, e.Bounds)
e.Painter.DrawObject(e.Info)
End Sub
Private Sub gridView1_CustomDrawGroupRow(ByVal sender As Object, ByVal e As Views.Base.RowObjectCustomDrawEventArgs)
Dim info As GridGroupRowInfo = CType(e.Info, GridGroupRowInfo)
If Equals(info.Column.FieldName, "Discontinued") Then
winforms-grid-display-custom-rows/VB/CustomRowInGrid/Form1.vb#L114
If dsw.IsCustomItemIndex(index) Then
Dim info As GridGroupRowInfo = TryCast(e.Info, GridGroupRowInfo)
info.GroupText = "Custom Rows"
See Also
CustomDrawObjectEventArgs Class