Spread for ASP.NET 9.0 Product Documentation
SelectionModel Property
Example 


Gets or sets the selections for the sheet.
Syntax
'Declaration
 
Public Property SelectionModel As ISheetSelectionModel
'Usage
 
Dim instance As SheetView
Dim value As ISheetSelectionModel
 
instance.SelectionModel = value
 
value = instance.SelectionModel
public ISheetSelectionModel SelectionModel {get; set;}

Property Value

ISheetSelectionModel object containing the selections
Remarks
This property is available at run time only.
Example
This example uses the SheetView object to change the appearance of a selected cell or cells, and selects a range of cells and returns if a cell in row 0 has been selected.
FarPoint.Web.Spread.SheetView sv=FpSpread1.ActiveSheetView;
FarPoint.Web.Spread.Border bord=new FarPoint.Web.Spread.Border(BorderStyle.Double,Color.Tomato,3);
bool bl;
sv.SelectionModel.SetSelection(0,0,3,3);
bl=sv.SelectionModel.IsAnyCellInRowSelected(0);
sv.SelectionBackColor=Color.Yellow;
sv.SelectionForeColor=Color.Red;
sv.SelectionBorder=bord;
sv.SetValue(0,0,"Test");
ListBox1.Items.Add(Convert.ToString(bl));
Dim sv As FarPoint.Web.Spread.SheetView
Dim bord As New FarPoint.Web.Spread.Border(BorderStyle.Double,Color.Tomato,3)
Dim bl As Boolean
sv=FpSpread1.ActiveSheetView
sv.SelectionModel.SetSelection(0,0,3,3)
bl=sv.SelectionModel.IsAnyCellInRowSelected(0)
sv.SelectionBackColor=Color.Yellow
sv.SelectionForeColor=Color.Red
sv.SelectionBorder=bord
sv.SetValue(0,0,"Test")
ListBox1.Items.Add(bl)
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
ISheetSelectionModel Interface

User-Task Documentation

Understanding the Selection Model

 

 


Copyright © GrapeCity, inc. All rights reserved.