# AddSelection

Use the AddSelection method to add a selection. Learn its syntax and parameters in documentation.

## Content

Adds a selection.

## Syntax

[JavaScript]

```javascript
FpSpread1.AddSelection(row,column,rowcount,columncount);
```

## Parameters

***row***
Integer, row index
***column***
Integer, column index
***rowcount***
Integer, number of rows
***columncount***
Integer, number of columns

## Return Type

None

## Remarks

This method is similar to selecting cells with the mouse.

## Example

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

```javascript
<script type="text/javascript">
   function addSelRanges() {
       FpSpread1.AddSelection(0,0,1,1); // adds a selection
       FpSpread1.AddSelection(2,2,1,1); // adds another selection
   }
</script>
```

## See Also

[Add](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allmeths/CSSR-Add)
[Delete](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allmeths/CSSR-Delete)
[Scripting Members](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members)
[TapToAddSelection](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allprops/CSSR-taptoadd)