Spread for ASP.NET 9.0 Product Documentation
AllowDelete Property
Example 


Gets or sets whether a user can delete a row in the sheet.
Syntax
'Declaration
 
Public Property AllowDelete As Boolean
'Usage
 
Dim instance As SheetView
Dim value As Boolean
 
instance.AllowDelete = value
 
value = instance.AllowDelete
public bool AllowDelete {get; set;}

Property Value

Boolean: true to allow users to delete a row; false otherwise
Remarks

Set this property to true to let users delete a row in the sheet. When you set this property to true, the sheet also displays the Delete command button in the command bar.

This property only has an effect if the OperationMode property is set to a value other than ReadOnly or SingleSelect.

Example
This example creates a SheetView object and assigns it to the active sheet. The ActiveColumn and ActiveRow properties are set and a value is placed in the active cell. The AllowInsert and AllowDelete properties are set to true so that when the user clicks the Insert button on the command bar a row is inserted, when the user clicks the Add button a row is added at the bottom, and when the user clicks the Delete button the selected row is deleted.
FarPoint.Web.Spread.SheetView sv = FpSpread1.ActiveSheetView;
sv.ActiveColumn = 2;
sv.ActiveRow = 2;
sv.SetValue(sv.ActiveColumn, sv.ActiveRow, "Active");
sv.OperationMode = FarPoint.Web.Spread.OperationMode.Normal;
sv.AllowInsert = True;
sv.AllowDelete = True;
Dim sv As FarPoint.Web.Spread.SheetView
sv = FpSpread1.ActiveSheetView
sv.ActiveColumn = 2
sv.ActiveRow = 2
sv.SetValue(sv.ActiveColumn, sv.ActiveRow, "Active")
sv.OperationMode = FarPoint.Web.Spread.OperationMode.Normal
sv.AllowInsert = True
sv.AllowDelete = True
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

SheetView Class
SheetView Members
OperationMode Property
AllowInsert property

User-Task Documentation

Customizing the Command Buttons

 

 


Copyright © GrapeCity, inc. All rights reserved.