Version

DataSourcesRequested Event

Event used to return the list of data sources to display to the user when creating a new widget. If this handler is not installed Reveal will only display the list of data sources already used in the dashboard (if any).
Syntax
'Declaration
 
Public Event DataSourcesRequested As EventHandler(Of DataSourcesRequestedEventArgs)
public event EventHandler<DataSourcesRequestedEventArgs> DataSourcesRequested
Event Data

The event handler receives an argument of type DataSourcesRequestedEventArgs containing data related to this event. The following DataSourcesRequestedEventArgs properties provide information specific to this event.

PropertyDescription
Callback Callback to invoke with the list of data sources and items to display to the user.
Trigger Event that originated the data sources request, one of visualization, dashboard filter or data blending.
Example
private void RevealView_DataSourcesRequested(object sender, DataSourcesRequestedEventArgs e)
{
    var inMemoryDSI = new RVInMemoryDataSourceItem("employees");
    inMemoryDSI.Title = "Employees";
    inMemoryDSI.Description = "Employees";
            
    var sqlDs = new RVSqlServerDataSource();
    sqlDs.Title = "Clients";
    sqlDs.Id = "SqlDataSource1";
    sqlDs.Host = "db.mycompany.local";
    sqlDs.Port = 1433;
    sqlDs.Database = "Invoices";
            
    e.Callback(new RevealDataSources(
         new List<object>() { sqlDs }, 
         new List<object>() { inMemoryDSI }, 
         false));
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also