new module:ct-grid /Grid Row Selection Model(grid View)
Constructs a new GridRowSelectionModel
with the specified arguments.
Parameters:
Name | Type | Description |
---|---|---|
gridView |
module:ct-grid |
The grid to which the row selections will apply. The row selection model provides programmatic access to the row selections performed by the user. It is also
the mechanism by which the default user interface (via the The methods within this class are cumulative rather than definitive. For example, if you invoke
|
Methods
add Row Selection Listener(listener)
Adds a listener to the row selection model, to be communicated of all row selection events.
Parameters:
Name | Type | Description |
---|---|---|
listener |
module:ct-grid |
The object nominating to receive row selection call-backs. |
deselect All Rows()
Deselect all rows.
deselect Row(subject)
Deselect the given row.
Parameters:
Name | Type | Description |
---|---|---|
subject |
String | The subject identifier of the row to be deselected. |
deselect Row Range(sFrom Subject, sToSubject)
Deselect a given row range.
Parameters:
Name | Type | Description |
---|---|---|
sFromSubject |
String | The subject identifier of the first row to be deselected. |
sToSubject |
String | The subject identifier of the last row to be deselected. |
get Selected Rows() → {Array}
Retrieve a list of the currently selected rows.
Returns:
An array of the subject identifiers for the currently selected rows.
- Type
- Array
has Selected Rows() → {boolean}
Specifies whether there are any rows selected or not.
Returns:
true
if there are no rows selected, and false
otherwise.
- Type
- boolean
is Selected Row(subject) → {boolean}
Determines whether a given row is selected or not.
Parameters:
Name | Type | Description |
---|---|---|
subject |
String | The subject identifier of the row in question. |
Returns:
true
if the row is selected, and false
otherwise.
- Type
- boolean
remove Row Selection Listener(listener)
Remove a previously registered row selection listener.
Parameters:
Name | Type | Description |
---|---|---|
listener |
module:ct-grid |
The row selection listener to be removed. |
select All Rows()
Select all rows within the entire grid.
select Row(subject)
Select the given row.
Parameters:
Name | Type | Description |
---|---|---|
subject |
String | The subject identifier of the row to be selected. |
select Row Range(sFrom Subject, sToSubject)
Select a given row range.
Parameters:
Name | Type | Description |
---|---|---|
sFromSubject |
String | The subject identifier of the first row to be selected. |
sToSubject |
String | The subject identifier of the last row to be selected. |