# Restricting Editing in Specific Columns

## Content



To restrict editing in specific columns, set the [Locked](/componentone/docs/win/online-truedbgrid/) property to **True**. This property can be set either in the designer or in code.

### In the Designer

Complete the following steps to lock the _Last_ column:

1.  Open the **C1TrueDBGrid Designer**. For information on how to access the **C1TrueDBGrid** **Designer**, see Accessing the [C1TrueDBGrid Designer](/componentone/docs/win/online-truedbgrid/design-time/truedbgrid-designer).
2.  In the designer, select the _Last_ column by clicking it in the right pane.<br />The column can also be selected by choosing _Last_ from the drop-down list in the toolbar.
3.  Click the **Display Column** tab in the left pane.
4.  Locate the [Locked](/componentone/docs/win/online-truedbgrid/) property and set it to **True**.
5.  Click **OK** to close the designer.

### In Code

Add the following code to the **Form\_Load** event to lock the _Last_ column:

```csharp
this.c1TrueDBGrid1.Splits[0].DisplayColumns["Last"].Locked = true;
```