ComponentOne Grid for WPF: Grid for WPF Task-Based Help > Controlling Grid Interaction > Locking the Grid from Being Edited

Locking the Grid from Being Edited

You can prevent users from altering the grid by setting the AllowEdit property to False.

In the Designer

Select the C1DataGrid control, locate the AllowEdit property in the Properties window, and set it to False to prevent users from editing the grid.

In XAML

Set the AllowEdit property to False to prevent users from editing the grid. For example, use the following XAML to prevent users from editing the grid:

    

<c1grid:C1DataGrid Name="C1DataGrid1" AllowEdit="False"/>

In Code

In the code below, the AllowEdit property is set to False to prevent users from editing the grid:

      Visual Basic

C1DataGrid1.AllowEdit = False

      C#

c1DataGrid1.AllowEdit = false;


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.