Progress® Telerik® Reporting R3 2021

DataItem.NeedDataSource Event

Occurs when the processing of the data item processing instance (i.e., DataItem instance) begins and this instance has no DataSource property set.

Namespace:  Telerik.Reporting
Assembly:  Telerik.Reporting (in Telerik.Reporting.dll)


public event EventHandler NeedDataSource


Type: SystemEventHandler


The event is hooked on the definition DataItem instance, but the sender object in the event handler is the processing DataItem instance. The processing instance of the data item inherits its DataSource from the definition instance, but if neither has DataSource set, this event is raised.


The following example demonstrates how to implement a NeedDataSource event handler:
void table1_NeedDataSource(object sender, EventArgs e)
    Telerik.Reporting.Processing.DataItem processingDataItem = (Telerik.Reporting.Processing.DataItem)sender;
    Telerik.Reporting.Processing.Report processingReport = processingDataItem.Report;
    object processingParameterValue = processingReport.Parameters["parameter1"].Value;
    processingDataItem.DataSource = GetData(processingParameterValue);

static object GetData(object value)
    // Implement your custom data retrieval logic instead
    return new string[] { "Sofia", "London", "Tokyo" };

Version Information

Supported in: 1.0.1

See Also

In this article
Not finding the help you need?