Spread ASP.NET 6.0 Product Documentation
GetSelectedRange
Send Feedback
Spread ASP.NET 6.0 Product Documentation > Client-Side Scripting Reference > Scripting Members > Methods > GetSelectedRange

Glossary Item Box

Gets the range of cells that are selected on the displayed page.

Syntax

[JavaScript]

var range = FpSpread1.GetSelectedRange();

Parameters

None

Return Type

The returned value is a JavaScript object with the following properties: type, row, column, rowCount, and columnCount. The row and column properties are the indexes of the starting cell in the range. The rowCount and columnCount are the number of rows and columns in the range. The type property, which specifies the type of range, can be one of the following: Cell (if range is a range of cells but not entire row or column), Row (if range is an entire row or multiple rows) or Column (if range is entire column or multiple columns).

Remarks

This method gets the entire range of selected table cells as a JavaScript object.

Example

This is a sample that contains the method. On the client side, the script that contains the method would look like this:

JavaScript Copy Code
<SCRIPT language=javascript>
    function showSelection() { 
       var rg = FpSpread1.GetSelectedRange(); 
       alert("selected "+rg.type+", "+rg.row+", "+rg.col+", "+rg.rowCount+", "+rg.colCount); 
    } 
</SCRIPT>

See Also

GetCellByRowCol | SetSelectedRange | Scripting Members

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