Spread ASP.NET 6.0 Product Documentation
CellRange Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SpreadDataSource Class : CellRange Property


Glossary Item Box

Gets or sets the range of cells for this data source.

Syntax

Visual Basic (Declaration) 
Public Property CellRange As CellRange
Visual Basic (Usage)Copy Code
Dim instance As SpreadDataSource
Dim value As CellRange
 
instance.CellRange = value
 
value = instance.CellRange
C# 
public CellRange CellRange {get; set;}

Property Value

CellRange containing the range of cells

Example

This example binds a cell range and a listbox to the Spread data source.
C#Copy Code
FpSpread1.DataSource = AccessDataSource1;
FarPoint.Web.Spread.SpreadDataSource spreadDS = new FarPoint.Web.Spread.SpreadDataSource();
spreadDS.SheetName = FpSpread1.ActiveSheetView.SheetName;
spreadDS.SpreadID = "FpSpread1";//FpSpread1.ID;
spreadDS.CellRange = new FarPoint.Web.Spread.Model.CellRange(0, 0, 3, 1);
this.Controls.Add(spreadDS);
this.ListBox1.DataSource = spreadDS;
this.ListBox1.DataTextField = "UserName";
this.ListBox1.DataBind();

Visual BasicCopy Code
FpSpread1.DataSource = AccessDataSource1
Dim spreadDS As New FarPoint.Web.Spread.SpreadDataSource()
spreadDS.SheetName = FpSpread1.ActiveSheetView.SheetName
spreadDS.SpreadID = "FpSpread1"
spreadDS.CellRange = New FarPoint.Web.Spread.Model.CellRange(0, 0, 3, 1)
Controls.Add(spreadDS)
ListBox1.DataSource = spreadDS
ListBox1.DataTextField = "UserName"
ListBox1.DataBind()

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.