Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RadListView

This class represents the RadListView component. RadListView is based on the already familiar native Android and iOS components from Progress Telerik UI for Android and Progress Telerik UI for iOS. The component exposes all major features supported by the native controls through a unified API suitable for NativeScript developers.

Hierarchy

  • any

Index

Properties

Methods

Properties

_hasGroupingFunctionChanged

_hasGroupingFunctionChanged: boolean

android

android: any

The native 'android.widget.FrameLayout' object.

androidListView

androidListView: any

The native 'com.telerik.widget.list.RadListView' object.

enableCollapsibleGroups

enableCollapsibleGroups: boolean

Gets or sets a value indicating if the collapse/expand grouping functionality of the RadListView is enabled.

filteringFunction

filteringFunction: function

Gets or sets a function that will be called to filter the items of the RadListView if either {@link enableGroups} or enableCollapsibleGroups property is set to 'true'.

Type declaration

    • (item: any): boolean
    • Parameters

      • item: any

      Returns boolean

footerItemTemplate

footerItemTemplate: string

Gets or sets the template used to visualize a footer in the list.

groupTemplate

groupTemplate: string

Gets or sets the UI template for list view groups.

groupingFunction

groupingFunction: function

Gets or sets a function that will be called to group the items of the RadListView if either {@link enableGroups} or enableCollapsibleGroups property is set to 'true'.

Type declaration

    • (item: any): any
    • Parameters

      • item: any

      Returns any

headerItemTemplate

headerItemTemplate: string

Gets or sets the template used to visualize a header in the list.

itemReorder

itemReorder: boolean

Gets or sets a boolean value determining whether reordering items is enabled or not.

itemSwipe

itemSwipe: boolean

[@deprecated: Please use the 'swipeActions' instead].

itemSwipeTemplate

itemSwipeTemplate: string

Gets or sets the UI template for the background view of an item shown on during swipe.

itemTemplate

itemTemplate: string

Gets or sets the UI template for list view items.

itemTemplateSelector

itemTemplateSelector: string | function

A function that returns the appropriate key that represents the template based on the data item.

itemTemplates

itemTemplates: string | Array<KeyedTemplate>

Gets or sets the UI templates for list view items.

itemViewDisposer

itemViewDisposer: function

Used internally inside the Angular directives Called when the refresh function is called.

Type declaration

    • (): void
    • Returns void

itemViewLoader

itemViewLoader: function

Used internally inside the Angular directives Gets or sets the item view loaded used by the @link RadListView} when creating its item views.

Type declaration

    • (viewType: any): View
    • Parameters

      • viewType: any

      Returns View

items

items: any

Gets or sets the source collection used to populate the RadListView.

listViewLayout

listViewLayout: ListViewLayoutBase

The layout object used to arrange items.

loadOnDemandBufferSize

loadOnDemandBufferSize: number

Gets or sets a number determining the amount of items remaining between the current scrolling position and the end which, when exceeded, will trigger a loadMoreDataRequestedEvent. Default value: on iOS: '5', on Android: '10'

loadOnDemandMode

loadOnDemandMode: ListViewLoadOnDemandMode

Gets or sets a value from the ListViewLoadOnDemandMode list determining the currently active load-on-demand mode.

multipleSelection

multipleSelection: boolean

Gets or sets a boolean value determining whether multiple selection is enabled or not.

nativeScriptViewAdded

nativeScriptViewAdded: function

Used internally inside the Angular directives Called when a wrapper View of any of the templates is added to the RadListView. We wrap the itemTemplate on Android to support simple Label template with margin set, and we wrap the first groupTemplate on iOS to achieve support for headerItemTemplate with grouping enabled.

Type declaration

    • (parent: View, child: View): void
    • Parameters

      • parent: View
      • child: View

      Returns void

pullToRefresh

pullToRefresh: boolean

Gets or sets a boolean value determining whether the user is able to perform the pull-to-refresh gesture.

pullToRefreshStyle

pullToRefreshStyle: PullToRefreshStyle

Gets or sets an instance of the PullToRefreshStyle class used to style the Pull-to-Refresh indicator.

reorderMode

reorderMode: ListViewReorderMode

Gets or sets a value from the ListViewReorderMode enum determining whether item reorder will happen on hold and drag or simply drag.

scrollPosition

scrollPosition: ListViewScrollPosition

Gets or sets the scroll position used by the 'scrollToIndex()' function. Available on iOS only.

selectionBehavior

selectionBehavior: ListViewSelectionBehavior

Gets or sets a value from the ListViewSelectionBehavior list determining whether items are selected on press, long press, or can't be selected at all.

sortingFunction

sortingFunction: function

Gets or sets a function that will be called to sort the items of the RadListView if either {@link enableGroups} or enableCollapsibleGroups property is set to 'true'.

Type declaration

    • (item: any, otherItem: any): number
    • Parameters

      • item: any
      • otherItem: any

      Returns number

swipeActions

swipeActions: boolean

Gets or sets a boolean value determining whether the user is able to swipe items or not.

Static dataPopulatedEvent

dataPopulatedEvent: string

This event is raised when the RadListView has populated an object from its 'items' collection.

Static enableCollapsibleGroupsProperty

enableCollapsibleGroupsProperty: Property<RadListView, boolean>

Identifies the enableCollapsibleGroups dependency property. NOTE: This feature is not supported on iOS

Static filteringFunctionProperty

filteringFunctionProperty: Property<RadListView, function>

Identifies the filteringFunction dependency property.

Static footerItemTemplateProperty

footerItemTemplateProperty: Property<RadListView, string>

Identifies the footerItemTemplate dependency property.

Static groupTemplateProperty

groupTemplateProperty: Property<RadListView, string>

Identifies the groupTemplate dependency property.

Static groupingFunctionProperty

groupingFunctionProperty: Property<RadListView, function>

Identifies the groupingFunction dependency property.

Static headerItemTemplateProperty

headerItemTemplateProperty: Property<RadListView, string>

Identifies the headerItemTemplate dependency property.

Static itemDeselectedEvent

itemDeselectedEvent: string

This event is fired after deselecting an item. The event exposes an instance of the ListViewEventData class.

Static itemDeselectingEvent

itemDeselectingEvent: string

This event is fired before item to be deselected. Return value indicates whether the specified item should be deselected. The event exposes an instance of the ListViewEventData class.

Static itemHoldEvent

itemHoldEvent: string

This event is fired when the user presses and holds an item. The event exposes an instance of the ListViewEventData class.

Static itemLoadingEvent

itemLoadingEvent: string

This event is fired each time an item is about to be visualized by RadListView. The event provides an instance of the ListViewEventData class and exposes the a View instance that represents container to be visualized. It allows for customization of the appearance of a particular item depending on the data object assigned to it.

Static itemReorderProperty

itemReorderProperty: Property<RadListView, boolean>

Identifies the itemReorder dependency property.

Static itemReorderStartedEvent

itemReorderStartedEvent: string

This event is fired when an item is about to be reordered. The event exposes an instance of the ListViewEventData class which contains the items of the item that is about to be reordered.

Static itemReorderStartingEvent

itemReorderStartingEvent: string

This event is fired when the user attempts to reorder an item. It can be used to cancel the reorder procedure. The event exposes an instance of the ListViewEventData class which contains the items of the item that is about to be reordered. Using the {@code returnValue} property of the event arguments you can block or allow the reordering procedure.

Static itemReorderedEvent

itemReorderedEvent: string

This event is fired after reordering an item in list view. The event exposes an instance of the ListViewEventData class which data property which returns an object containing a targetIndex and targetGroupIndex properties depicting the destination of the reordered item.

Static itemSelectedEvent

itemSelectedEvent: string

This event is fired after selecting an item. The event exposes an instance of the ListViewEventData class.

Static itemSelectingEvent

itemSelectingEvent: string

This event is fired before an item to be selected. Return value indicates whether the specified item should be selected. The event exposes an instance of the ListViewEventData class.

Static itemSwipeProgressChangedEvent

itemSwipeProgressChangedEvent: string

This event is continuously fired while the user is swiping an item. The event arguments expose an instance of the ListViewEventData. An additional 'data' property of the arguments exposes an instance of the SwipeOffsets class containing information about the swipe progress.

Static itemSwipeProgressEndedEvent

itemSwipeProgressEndedEvent: string

This event is fired when the user has finished swiping an item. The event arguments expose an instance of the ListViewEventData. An additional 'data' property of the arguments exposes an instance of the SwipeOffsets class containing information about the swipe progress.

Static itemSwipeProgressStartedEvent

itemSwipeProgressStartedEvent: string

This event is fired when the user starts swiping a item. The event arguments expose an instance of the ListViewEventData. An additional 'data' property exposes an instance of the SwipeOffsets class containing information about the swipe progress.

Static itemSwipeProperty

itemSwipeProperty: Property<RadListView, string>

[@deprecated: Please use the 'swipeActions' instead].

Static itemSwipeTemplateProperty

itemSwipeTemplateProperty: Property<RadListView, string>

Identifies the itemSwipeTemplate dependency property.

Static itemSwipingEvent

itemSwipingEvent: string

This event is fired when the user starts swiping a item. The handler of the event receives an instance of the ListViewEventData. The returnValue property of the arguments can be used to cancel the swipe gesture.

Static itemTapEvent

itemTapEvent: string

This event is fired when the user clicks/taps an item. The event exposes an instance of the ListViewEventData class.

Static itemTemplateProperty

itemTemplateProperty: Property<RadListView, string>

Identifies the itemTemplate dependency property.

Static itemsProperty

itemsProperty: Property<RadListView, any>

Identifies the items dependency property.

Static listViewLayoutProperty

listViewLayoutProperty: Property<RadListView, ListViewLayoutBase>

Identifies the listViewLayout dependency property.

Static loadMoreDataRequestedEvent

loadMoreDataRequestedEvent: string

Called after the user requested loading more data on demand by scrolling over the item buffer limit size. The event exposes an instance of the ListViewEventData class which returnValue property determines whether more data will be loaded.

Static loadOnDemandBufferSizeProperty

loadOnDemandBufferSizeProperty: Property<RadListView, number>

Identifies the loadOnDemandBufferSize dependency property.

Static loadOnDemandModeProperty

loadOnDemandModeProperty: Property<RadListView, ListViewLoadOnDemandMode>

Identifies the loadOnDemandMode dependency property.

Static multipleSelectionProperty

multipleSelectionProperty: Property<RadListView, boolean>

Identifies the multipleSelection dependency property.

Static pullToRefreshInitiatedEvent

pullToRefreshInitiatedEvent: string

Called after the user requested loading more data by pulling down the list. The event exposes an instance of the ListViewEventData class which returnValue property determines whether more data will be loaded.

Static pullToRefreshProperty

pullToRefreshProperty: Property<RadListView, boolean>

Identifies the pullToRefresh dependency property.

Static pullToRefreshStyleProperty

pullToRefreshStyleProperty: Property<RadListView, PullToRefreshStyle>

Identifies the pullToRefreshStyle dependency property.

Static reorderModeProperty

reorderModeProperty: Property<RadListView, ListViewReorderMode>

Identifies the reorderMode dependency property.

Static scrollDragEndedEvent

scrollDragEndedEvent: string

This event is fired each time the user raises their finger from the device's screen as a result of a scrolling gesture. This event marks the end of a user-interaction sessions related to scrolling the list. An instance of the ListViewScrollEventData is provided with information about the scroll offset.

Static scrollEndedEvent

scrollEndedEvent: string

This event is fired each time the list stops scrolling. An instance of the ListViewScrollEventData is provided with information about the scroll offset.

Static scrollPositionProperty

scrollPositionProperty: Property<RadListView, ListViewScrollPosition>

Identifies the scrollPosition dependency property. Available on iOS only.

Static scrollStartedEvent

scrollStartedEvent: string

This event is fired each time the list starts scrolling. An instance of the ListViewScrollEventData is provided with information about the scroll offset.

Static scrolledEvent

scrolledEvent: string

This event is fired each time the list changes its scroll offset. An instance of the ListViewScrollEventData is provided with information about the scroll offset.

Static selectionBehaviorProperty

selectionBehaviorProperty: Property<RadListView, ListViewSelectionBehavior>

Identifies the selectionBehavior dependency property.

Static sortingFunctionProperty

sortingFunctionProperty: Property<RadListView, function>

Identifies the sortingFunction dependency property.

Static swipeActionsProperty

swipeActionsProperty: Property<RadListView, boolean>

Identifies the swipeActions dependency property.

Methods

deselectAll

  • deselectAll(): void
  • Deselects all items currently available in RadListView.

    Returns void

deselectItemAt

  • deselectItemAt(index: number): any
  • Deselects the item at the provided index if it is selected.

    Parameters

    • index: number

      the index of the item within the data source.

    Returns any

getFirstVisiblePosition

  • getFirstVisiblePosition(): any
  • Returns the index of the first visible item.

    Returns any

getItemAtIndex

  • getItemAtIndex(index: number): any
  • Returns the data item at the specified index.

    Parameters

    • index: number

    Returns any

getScrollOffset

  • getScrollOffset(): number
  • Returns the current scroll offset of the list in pixels.

    Returns number

getSelectedItems

  • getSelectedItems(): Array<any>
  • Returns an ObservableArray that contains the items currently selected in RadListView.

    Returns Array<any>

getViewForItem

  • getViewForItem(item: any): View
  • Returns the {N} View that is used to visualize the provided item from the currently assigned source. In case the item is not in the current viewport the method returns undefined.

    Parameters

    • item: any

      The item from the current source for which to find the View.

    Returns View

    The {N} View used to visualize the provided item.

isItemSelected

  • isItemSelected(item: any): boolean
  • Checks whether the provided item is selected or not. Returns true if the item is selected, otherwise false.

    Parameters

    • item: any

      an arbitrary item part of the data source the current RadListView instance is populated with.

    Returns boolean

notifyLoadOnDemandFinished

  • notifyLoadOnDemandFinished(disableLoadOnDemand?: boolean): void
  • Must be called when data is delivered after a load-on-demand request has been made. Params: 'disableLoadOnDemand' - indicates if the "loadOnDemandMode" should be reset to 'None' after the event cycle is finished

    Parameters

    • Optional disableLoadOnDemand: boolean

    Returns void

notifyPullToRefreshFinished

  • notifyPullToRefreshFinished(enableLoadOnDemand?: boolean): void
  • Must be called when data is delivered after a pull-to-refresh gesture initiated by the user. Params: 'enableLoadOnDemand' - indicates if the "loadOnDemandMode" should be returned to its previous state, after the event cycle is finished

    Parameters

    • Optional enableLoadOnDemand: boolean

    Returns void

notifySwipeToExecuteFinished

  • notifySwipeToExecuteFinished(): void
  • Must be called when a swipe-to-execute action has been requested. Calling this method will close the revealed swipe actions.

    Returns void

refresh

  • refresh(): void
  • Refreshes the RadListView by rebinding it to the source.

    Returns void

resumeUpdates

  • resumeUpdates(refresh: boolean): any
  • When called, resumes the UI updates performed by RadListView when changes in the source collection occur.

    Parameters

    • refresh: boolean

      When true RadListView will perform a complete UI refresh.

    Returns any

scrollToIndex

  • scrollToIndex(index: number, animate: boolean): void
  • scrollToIndex(index: number, animate: boolean, snapMode: ListViewItemSnapMode): void
  • scrollToIndex(index: number): void
  • Scrolls the list to a position where the item with the provided index is visible.

    Parameters

    • index: number

      the index of the item from the source which needs to be shown.

    • animate: boolean

      a boolean value determining whether the list will animate to the desired position.

    Returns void

  • Scrolls the list to a position where the item with the provided index is visible.

    Parameters

    • index: number

      the index of the item from the source which needs to be shown.

    • animate: boolean

      a boolean value determining whether the list will animate to the desired position. Currently, the animate value must always be {@code true}.

    • snapMode: ListViewItemSnapMode

      a value from the ListViewItemSnapMode enum determining the snap position for the item at the target index.

    Returns void

  • Scrolls the list to a position where the item with the provided index is visible.

    Parameters

    • index: number

      the index of the item from the source which needs to be shown.

    Returns void

scrollWithAmount

  • scrollWithAmount(amount: number, animate: boolean): void
  • Scrolls the list component with a given amount of pixels in the currently active direction. The scroll is either in a forward or a backward direction depending on the sign of the amount.

    Parameters

    • amount: number

      the amount of pixels to scroll by.

    • animate: boolean

      if animation is to be used when scrolling, otherwise {@code false}.

    Returns void

selectAll

  • selectAll(): void
  • Selects all items currently available in RadListView.

    Returns void

selectItemAt

  • selectItemAt(index: number): any
  • Selects the item from the data source at the provided index.

    Parameters

    • index: number

      the index of the item within the data source.

    Returns any

suspendUpdates

  • suspendUpdates(): void
  • When called, prevents RadListView from refreshing its UI when changes in the source collection occur. This call is reversed via a call of the resumeUpdates method.

    Returns void

updateHeaderFooter

  • updateHeaderFooter(): void
  • Refreshes the view/template set to the header and footer elements of RadListView by rebinding it to the source, triggering new measuring and layout circle. Note: This method is only supported in iOS, calling it on Android does nothing.

    Returns void

updatesSuspended

  • updatesSuspended(): boolean
  • Returns a boolean value that determines whether the UI updates are currently suspended.

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method