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

  • void
    • RadListView

Index

Properties

Methods

Properties

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.

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.

itemViewLoader

itemViewLoader: function

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: Array<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.

loadOnDemandMode

loadOnDemandMode: string

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.

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: string

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

selectionBehavior

selectionBehavior: string

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

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

Static filteringFunctionProperty

filteringFunctionProperty: Property

Identifies the filteringFunction dependency property.

Static footerItemTemplateProperty

footerItemTemplateProperty: Property

Identifies the footerItemTemplate dependency property.

Static groupingFunctionProperty

groupingFunctionProperty: Property

Identifies the groupingFunction dependency property.

Static headerItemTemplateProperty

headerItemTemplateProperty: Property

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

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

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

Static itemSwipeTemplateProperty

itemSwipeTemplateProperty: Property

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

Identifies the itemTemplate dependency property.

Static itemsProperty

itemsProperty: Property

Identifies the items dependency property.

Static listViewLayoutProperty

listViewLayoutProperty: Property

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

Identifies the loadOnDemandBufferSize dependency property.

Static loadOnDemandModeProperty

loadOnDemandModeProperty: Property

Identifies the loadOnDemandMode dependency property.

Static multipleSelectionProperty

multipleSelectionProperty: Property

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

Identifies the pullToRefresh dependency property.

Static pullToRefreshStyleProperty

pullToRefreshStyleProperty: Property

Identifies the pullToRefreshStyle dependency property.

Static reorderModeProperty

reorderModeProperty: Property

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

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

Identifies the selectionBehavior dependency property.

Static sortingFunctionProperty

sortingFunctionProperty: Property

Identifies the sortingFunction dependency property.

Static swipeActionsProperty

swipeActionsProperty: Property

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

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(): void
  • Must be called when data is delivered after a load-on-demand request has been made.

    Returns void

notifyPullToRefreshFinished

  • notifyPullToRefreshFinished(): void
  • Must be called when data is delivered after a pull-to-refresh gesture initiated by the user.

    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(): any
  • 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 any

updatesSuspended

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

    Returns boolean

Generated using TypeDoc