skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Tools
    ThemeBuilder Design System Kit
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now
Search all

Class ObjectDataSource

Represents a data source component retrieving data from business objects.

Inheritance
System.Object
DataSource
ObjectDataSourceBase
ObjectDataSource
Inherited Members
ObjectDataSourceBase.Parameters
DataSource.ICloneable.Clone()
DataSource.Name
DataSource.Description
DataSource.CalculatedFields
DataSource.IDataSource.Name
Namespace: Telerik.Reporting
Assembly: Telerik.Reporting.dll

Syntax

public class ObjectDataSource : ObjectDataSourceBase, INamedObject, ICloneable, IEquatableDataSource, IObjectDataSource, ISimpleDataSource, IDataSource

Constructors

ObjectDataSource()

Initializes a new instance of the ObjectDataSource class.

Declaration
public ObjectDataSource()

ObjectDataSource(Object, String)

Initializes a new instance of the ObjectDataSource class.

Declaration
public ObjectDataSource(object dataSource, string dataMember)
Parameters
System.Object dataSource

Specifies the data source object that is used to connect to data.

System.String dataMember

Specifies the data source member that is used to connect to data.

Properties

DataMember

Gets or sets the data source member that is used to connect to data.

Declaration
public string DataMember { get; set; }
Property Value
System.String

Remarks

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 System.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

Gets or sets the data source object that is used to connect to data.

Declaration
public object DataSource { get; set; }
Property Value
System.Object

Remarks

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 System.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.

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Online Demos
Support Resources
  • Documentation
  • Knowledge Base
  • Videos
  • Reporting Samples Repository
  • Reporting Release History
Community
  • Forums
  • Blogs
  • Reporting Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.