All I want to do is change the datasource for a textbox. The datasource for an adjacent datasource is the one I want. In the image I want to change the datasource from the one on the left to the one on the right. It seems like this should be simple, but I haven't found a way to change. Thanks.
1 Answer, 1 is accepted
0
Elena
Telerik team
answered on 01 May 2020, 08:18 AM
Hi Kirti,
The Data Source Components are intended to specify declaratively how to retrieve data for Data Items but do not contain any data themselves. Their purpose is only to specify the means of how to obtain it. The data items are the ones that display and manipulate data in the reports and are bound to the data source components. There are several types of data items: Report (SubReport), Table, Crosstab, List, Graph, and Map.
When the data needed for your Table, Chart, or another data item is already present in the parent's data source e.g., the report's data source, you can improve the report performance by reusing the data from the parent, instead of creating and configuring a new data source component to retrieve the data anew. You can reuse the data by adding a Binding to the data item's DataSource property with the following expression: = ReportItem.DataObject.
You can read more about how the reporting data objects work in the following links:
From what you've written, I assume that you want to have two data source components in one data item which, unfortunately, is not possible by design. You will have to either change the initial data source to the second one or move the textbox in another data item container which is bound to the second data source.
I hope I have managed to explain how data items and binding work clearly enough but if you have any additional questions, feel free to ping us any time.
Regards,
Elena
Progress Telerik
Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic. Our thoughts here at Progress are with those affected by the outbreak.