XtraReport.DrawGrid Property
Gets or sets a value indicating whether to draw the snap grid over the report surface.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v19.1.dll
NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Core
Declaration
[DefaultValue(true)]
[SRCategory(ReportStringId.CatDesign)]
public bool DrawGrid { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Boolean | **true** | true, to display the snap grid; otherwise, false. |
Remarks
By default, when a report is being edited, it is lined up by the snap grid. This helps to establish the distance between report elements and precisely align them to each other.
The DrawGrid property allows you to show or hide the snap grid as shown in the following image.
DrawGrid = true | DrawGrid = false |
---|---|
To specify whether to snap controls to the snap grid, use the XtraReport.SnappingMode property. To change the snap grid dimensions, use the XtraReport.SnapGridSize property.
Note
You can set the DrawGrid property globally, so that all the newly created reports have this property set to the required value. For this purpose, use the Report Designer Options dialog available within the XtraReports menu.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DrawGrid 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.