ListViewAccessor class
Provides access to a SharePoint ListView control.
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ListViewAccessor
class.
Properties
applied |
Filters applied to the list view. |
columns | The columns in associated with this view, including hidden columns. |
folder |
Folder information for the list view. |
list | Basic information about the list rendered by the list view. |
rows | Currently rendered rows in the list view. |
selected |
Selected rows in the list view. |
sort |
Specifies whether the list view is sorted ascending or descending. |
sort |
Sort field name |
view | Basic information about the view rendered by the list view. |
Methods
try |
Returns the list view column corresponding to the field with the specified internal name, or undefined if none is found. |
Events
list |
Event that gets raised every time the list view state changes. |
selected |
Event that gets raised every time the selected items in the list view change. |
Property Details
appliedFilters
Filters applied to the list view.
abstract get appliedFilters(): {
[fieldName: string]: IFilter;
} | undefined;
Property Value
{ [fieldName: string]: IFilter; } | undefined
columns
The columns in associated with this view, including hidden columns.
abstract get columns(): ReadonlyArray<ColumnAccessor>;
Property Value
ReadonlyArray<ColumnAccessor>
folderInfo
Folder information for the list view.
abstract get folderInfo(): IFolderInfo | undefined;
Property Value
IFolderInfo | undefined
list
Basic information about the list rendered by the list view.
abstract get list(): IList | undefined;
Property Value
IList | undefined
rows
Currently rendered rows in the list view.
abstract get rows(): ReadonlyArray<RowAccessor>;
Property Value
ReadonlyArray<RowAccessor>
selectedRows
Selected rows in the list view.
abstract get selectedRows(): ReadonlyArray<RowAccessor> | undefined;
Property Value
ReadonlyArray<RowAccessor> | undefined
sortAscending
Specifies whether the list view is sorted ascending or descending.
abstract get sortAscending(): boolean | undefined;
Property Value
boolean | undefined
sortField
Sort field name
abstract get sortField(): string | undefined;
Property Value
string | undefined
view
Basic information about the view rendered by the list view.
abstract get view(): IView | undefined;
Property Value
IView | undefined
Method Details
tryGetColumnByName(internalName)
Returns the list view column corresponding to the field with the specified internal name, or undefined if none is found.
abstract tryGetColumnByName(internalName: string): ColumnAccessor | undefined;
Parameters
- internalName
-
string
Returns
ColumnAccessor | undefined
Event Details
listViewStateChangedEvent
Event that gets raised every time the list view state changes.
get listViewStateChangedEvent(): SPEvent<ListViewStateChangedEventArgs>;
Event Type
selectedRowsChangedEvent
Event that gets raised every time the selected items in the list view change.
get selectedRowsChangedEvent(): SPEvent<SelectedRowsChangedEventArgs>;