1. Component library

GenericDataProvider

Version:

You use the GenericDataProvider component to provide data for, for example, a ListControl. You will often use a ListControl in the DetailsPanel part of a JourneyChart control.

The GenericDataProvider component works in the same way as the ChartDataProvider component. It also calls an MVC Controller that must return data as a JSON object.

Properties

NameDescriptionDefault
ListSortingThis is a read-only property. You bind to this property from the Sorting property of a ListControl control.
PageNumberThe GenericDataProvider component updates this property with the index (number) of the current page when the PageSize property is smaller than the total number of pages.
PageSizeSpecify the number of records that the component retrieves from Sitecore.
Data
DataSPEAK updates this property with the data the service returns. This is a read-only property.
DataURLSpecify the URL of the service the component calls.
MessagesSPEAK updates this property with the messages the service returns, if any. This is a read-only property.
QueryParametersSpecify parameters for the service the component calls. This property is optional.
ServerSortingSpecify how the server sorts data. You specify an array of data sorting directions and data sorting fields. For example, to sort on the field called “visits” and set the sorting direction to “asc”, you enter this: {"field": "visits", "direction":"asc"}.

You specify asc for ascending sort, and desc for descending.
State
HasDataThe component sets this read-only property to True when it has data after getting a response from the service.
HasMoreDataThe component sets this read-only property to True when the service has more data than what has already been retrieved.
HasNoDataThe component sets this read-only property to True when it does not have data after getting a response from the service.
IsBusyThe component sets this read-only property to True when it is waiting for a response from the service.
TotalRecordCountThe component sets this read-only property to the number of total records the query retrieved.
If you have suggestions for improving this article, let us know!