Spread Windows Forms 12.0 Product Documentation
Allowing the User to Enter Data in Rows or Columns
Spread Windows Forms 12.0 Product Documentation > Developer's Guide > Customizing Row or Column Interaction > Allowing User Interaction with Rows and Columns > Allowing the User to Enter Data in Rows or Columns

You can restrict the portion of the sheet in which the user can enter data. You can set the size of the sheet in terms of rows and columns. You can hide rows or columns so the user does not have access to them at all, or set them as frozen so that users can see them but cannot move them out of view by scrolling. For more information on hidden rows and columns, refer to Showing or Hiding a Row or Column. For information on frozen rows and columns, refer to Setting Fixed (Frozen) Rows or Columns. For information on setting the number of rows and columns in a sheet, refer to Customizing the Number of Rows or Columns.

You can restrict the user from entering data beyond the data already in the sheet. Set the RestrictRows property and RestrictColumns property to restrict or allow the user to enter data in a row or column on a sheet that is more than one row or column beyond the last row or column that contains data.

Using the Properties Window

  1. At design time, in the Properties window, select the sheet.
  2. In the Behavior category, select the RestrictRows or the RestrictColumns property.
  3. Click the drop-down arrow to display the choices and select the value (True or False). Repeat this for each property.

Using Code

Set the RestrictRows or RestrictColumns property for the sheet.

Example

C#
Copy Code
fpSpread1.ActiveSheet.RestrictColumns = true;
fpSpread1.ActiveSheet.RestrictRows = true;
VB
Copy Code
fpSpread1.ActiveSheet.RestrictColumns = True
fpSpread1.ActiveSheet.RestrictRows = True

Using the Spread Designer

  1. Select Sheet from the drop-down combo list located on the top right side of the Designer.
  2. From the Behavior section, select True or False for RestrictRows or RestrictColumns.
  3. From the File menu, select Save and Exit to save the changes.