ObjectDataSource
Represents a data source component retrieving data from business objects.
Definition
Namespace:Telerik.Reporting
Assembly:Telerik.Reporting.dll
Syntax:
public class ObjectDataSource : ObjectDataSourceBase, IDataSource
Inheritance: objectMarshalByRefObjectComponentDataSourceObjectDataSourceBaseObjectDataSource...
Implements:
Inherited Members
Constructors
Initializes a new instance of the ObjectDataSource class.
public ObjectDataSource()
Initializes a new instance of the ObjectDataSource class.
public ObjectDataSource(object dataSource, string dataMember)
Specifies the data source object that is used to connect to data.
dataMemberstringSpecifies the data source member that is used to connect to data.
Properties
DataMember
string
Gets or sets the data source member that is used to connect to data.
public string DataMember { get; set; }
When the DataSource is a business object instance or type, the DataMember property determines the property or method of the business object to be invoked during data retrieval. If the DataSource property contains the Type of a business object, and the DataMember property is not set or is set to an empty string, the constructor with the specified parameters is invoked to create a new instance of the business object.
If the DataSource is an IListSource object with more than one table,
the DataMember property specifies the table to bind to.
For example, if the DataSource is a
DataSet or DataViewManager that contains three tables
named Customers, Orders, and
OrderDetails, the DataMember should contain the name of one of these tables.
DataSource
object
Gets or sets the data source object that is used to connect to data.
[TypeConverter(typeof(ObjectDataSourceTypeConverter))]
public object DataSource { get; set; }
The DataSource property can handle various built-in .NET types and types implementing various interfaces representing rows of data. Either an object instance of these types or a Type object from which the report engine will create an instance at runtime can be assigned to this property. Note that some of the supported data objects also require setting up the DataMember property.
More details and the full list of supported object types is available at https://docs.telerik.com/reporting/designing-reports/connecting-to-data/data-source-components/objectdatasource-component/overview.