this.UltraSpreadsheet1.ActiveSelection.AddCellRange(
new SpreadsheetCellRange(4, 7, 6, 27)
);
This topic explains the selection feature from developer perspective.
The following table lists the concept and topics required as a prerequisite to understanding this topic.
This topic contains the following sections:
The following table explains briefly the tasks available when working with selection and maps them to the members which are connected with them. Further details are available after the table.
You can obtain the sheet’s current selection using the CellRanges
property. It will return a read-only collection of cell ranges that are selected.
The following table maps the desired behaviors to the property settings that manage it.
The following code snippet demonstrates how to add one more selection range (starting from row 4, column 7 and ending with row 6, column 27) to the current selection. The code snippet assumes you have a reference to an UltraSpreadsheet instance named "UltraSpreadsheet1".
In C#:
this.UltraSpreadsheet1.ActiveSelection.AddCellRange(
new SpreadsheetCellRange(4, 7, 6, 27)
);
In Visual Basic:
Me.UltraSpreadsheet1.ActiveSelection.AddCellRange(_
New SpreadsheetCellRange(4, 7, 6, 27))
You can alter the sheet selection programmatically using the ActiveSelection
property. This property of type SpreadsheetSelection exposes a number of methods for adding, replacing and clearing cell ranges.
The following table maps the desired behaviors to the property settings that manage it.
In order for you to be notified when a selection change occurs you can hook on the SelectionChanged
event.
The following table maps the desired behaviors to the events that manage it.
The following topics provide additional information related to this topic.