Spread for ASP.NET 8.0 Product Documentation
GetSelectedRange

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 type="text/javascript">
    function showSelection() {
       var rg = FpSpread1.GetSelectedRange();
       alert("selected "+rg.type+", "+rg.row+", "+rg.col+", "+rg.rowCount+", "+rg.colCount);
    }
</script>
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback