Data Source Module

The Data Source Module provides a way to provide an entirely new Data Set to AdapTable based on user selection.

It is designed for those scenarios when there is too much data to send to the client at start-up, and developers want to provide an option for users to switch between different "data sources", with the result that the grid is populated with different data sets.

The Data Source Selector simply provides a dropdown which contains a list of all the data sources that are provided at design time through the DataSource section in Predefined Config.

These Data Sources are simply text names that developers provide and will typically correspond to Stored Procedures or other server-related items that make sense to the user (e.g. a 'book').

SearchChanged Event (and Server Searching)

Data Sources provide a nice alternative to Server Searching as it allows for data to be dynamically retrieved from the server as a response to user selection, but without needing to build a whole server-side searching and filtering infrastructure. And then users can filter the returned data set on the client as normal.

When a Data Source is selected, AdapTable will fire the SearchChangedEvent, providing the name of the newly selected Data Source and stating the trigger for the event to be 'DataSource'.


AdapTable performs no functionality itself when the Data Source is selected - it merely fires the SearchChangedEvent to say that it has been selected, and subscribers to the event can then provide AdapTable with the new data source.

UI Elements

Data Source includes the following UI Elements:

  • Popup - Shows a list of existing Data Sources with Edit and Delete buttons. Plus an Add button to start the Data Source Selector Wizard which facilitates the creation and editing of Data Source.

  • Toolbar - Displays a dropdown containing all the DataSources in the Adaptable State, and a button (with a tick) which is enabled when a Data Source is selected. When the button is clicked, the SearchChanged event fires.

  • Tool Panel - Same as Toolbar above.

UI Entitlements

UI Entitlements behaviour is as expected for Full and Hidden Access Levels.

The ReadOnly Entitlement behaviour is that Data Sources can be selected - and the SearchChanged Event will fire accordingly - but Users cannot manage or suspend them.

Data Source API

addDataSource(dataSource)Adds new DataSource to State
clearDataSource()Clears currently selected DataSource
createDataSource(dataSourceName, dataSourceDescription)Creates a DataSource from a given name and description
getAllDataSource()Retrieves all Data Sources in the Adaptable State
getCurrentDataSource()Retrieves the currently applied Data Source
getDataSourceById(id)Retrieves Data Source by id
getDataSourceByName(dataSourceName)Retrives Data Source from State with given name
getDataSourceState()Retrieves Data Source section from Adaptable State
setDataSource(dataSource)Makes given DataSource current
showDataSourcePopup()Opens Data Source popup screen

Data Source Predefined Config

CurrentDataSourceName of the currently selected Data Source
DataSourcesCollection of available Data Sources


Do Data Sources include parameterised queries?

Not currently but we hope to include this in a future release.

More Information