End-User Restrictions

Important

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

In some real-life applications, it might be necessary to prevent end-users from editing data in a grid (modify cell values, insert or delete data rows), or restrict data shaping capabilities (data sorting, grouping and filtering), etc. For example, it may be necessary to show grid data to end-users as read-only.

To implement end-user restrictions in your application, you can use the following properties.

Restriction

Description

GridColumn.IsReadOnly, GridControl.IsReadOnly

Specifies whether end-users are allowed to change cell data values, as well as insert and delete rows in the grid. You can prevent end-users from editing data in specific columns or in the entire grid.

In the read-only mode, a row in-place editor (or edit form) is not invoked on double-tapping a data cell, and the Edit Cell and Delete Row items disappear from the popup menu.

GridControl.NewItemRowVisibility

Specifies whether the grid shows the New Item Row allowing end-users to add new data rows.

GridControl.AllowEditRows

Specifies whether end-users are allowed to modify cell values.

If this functionality is disabled, a row in-place editor (or edit form) is not invoked on double-tapping a data cell, and the Edit Cell item disappears from the popup menu.

GridControl.AllowDeleteRows

Specifies whether end-users are allowed to remove data rows from the grid.

If this functionality is disabled, the Delete Row item disappears from the popup menu.

GridControl.AllowResizeColumns

Specifies whether end-users are allowed to change the column width with the pinch and spread gestures.

GridColumn.AllowSort, GridControl.AllowSort

Specifies whether end-users are allowed to sort data in the grid. You can restrict sorting by individual columns, or disable this functionality for the entire grid.

Note that when sorting by a column is disabled, grouping by this column becomes unavailable as well.

If this functionality is disabled, the Sort Ascending, Sort Descending, Clear Sort Order and Group By items disappear from the popup menu, and data sorting in not applied when an end-user taps a column header.

GridColumn.AllowGroup, GridControl.AllowGroup

Specifies whether end-users are allowed to group data in the grid. You can restrict grouping by individual columns, or disable this functionality for the entire grid.

If this functionality is disabled, the Group By item disappears from the popup menu.

GridControl.AllowGroupCollapse

Specifies whether end-users are allowed to collapse and expand data groups in the grid by tapping group rows.

GridControl.AutoFilterPanelVisibility, GridColumn.AllowAutoFilter

Specifies whether end-users are allowed to filter data by columns using the auto-filter panel shown below column headers.

You can hide an auto-filter panel in the grid entirely, or disable individual cells of the auto-filter panel to prevent end-users from filtering data by the corresponding columns.

GridControl.ColumnHeadersVisibility

Specifies whether column headers are shown in the grid.

GridControl.FilterPanelVisibility

Specifies whether end-users are allowed to manage (disable or clear) data filters currently applied in the grid using the filter panel.

By default, the filter panel is automatically shown at the bottom of the grid after a filter has been applied. Removing the filter hides this panel. You can make this panel always visible or always hidden by using the FilterPanelVisibility property.

GridControl.TotalSummaryVisibility

Specifies whether end-users are allowed to calculate total summaries for columns using the total summary panel.

You can also delete existing items from built-in popup menus using the GridControl.PopupMenuCustomization event. See the How to: Customize Popup Menu example.