[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Design.Designer.LockControls

LockControls Property

LockControls

Gets or sets a value indicating whether the controls within the designer are locked, preventing modifications.

Declaration
public bool LockControls { get; set; }
Property Value
Type Description
bool

true if the controls are locked and cannot be modified; otherwise, false. The default is false.

Remarks

When set to true, this property prevents any modifications to the controls' properties, size, or position within the designer, effectively making the design surface read-only. This is useful in scenarios where the design of the report is finalized and should not be altered.

Examples

The sample below opens a Windows Form with the designer, featuring a pre-built report. Users can modify certain properties of existing controls, but changing the report layout-specifically the position or size of report items-is not possible.

class TweakSalesReportForm : Form
{
	public TweakSalesReportForm()
	{
		var designer = new Designer { Dock = DockStyle.Fill };
		var propertyGrid = new PropertyGrid() { Dock = DockStyle.Right };
		designer.LoadReport(new FileInfo("c:\\reports\\Sales.rdlx"));
		designer.PropertyGrid = propertyGrid;
		designer.LockControls = false;
		Controls.Add(designer);
		Contorls.Add(propertyGrid);
	}
}