Current filter:
                                You should refresh the page.

                                This example performs the following steps to register object types for the Object Data Source Wizard, which allows users to create an Object Data Source:

                                • Declares the DataSource and DataSource2 classes that should provide data to reports. The DisplayName attribute is applied to the DataSource class to specify a custom display name for the Report Wizard and Data Source Wizard. The class's name and namespace are used for the DataSource2 class.

                                • Implements the IObjectDataSourceWizardTypeProvider interface to list data types.

                                • Implements the IObjectDataSourceConstructorFilterService interface to list only specific data type constructors in the Report Wizard and Data Source Wizard.

                                • Implements the IObjectDataSourceMemberFilterService interface to list only specific data members in the Report Wizard and Data Source Wizard.

                                • The RegisterObjectDataSourceWizardTypeProvider<T>(), RegisterObjectDataSourceConstructorFilterService<T>() and RegisterObjectDataSourceMemberFilterService<T>() methods are called at the application's startup to register the interface implementations.

                                Files to look at

                                ASP.NET WebForms:

                                • ObjectDataSource/SampleObjectTypes.cs
                                • Services/CustomObjectDataSourceWizardTypeProvider.cs
                                • Global.asax.cs

                                ASP.NET MVC:

                                • ObjectDataSource/SampleObjectTypes.cs
                                • Services/CustomObjectDataSourceWizardTypeProvider.cs
                                • Global.asax.cs

                                ASP.NET Core:

                                • ObjectDataSource/SampleObjectTypes.cs
                                • Services/CustomObjectDataSourceWizardTypeProvider.cs
                                • Startup.cs
                                Documentation • Register Types for Object Data Source Wizard (ASP.NET WebForms)
                                Register Types for Object Data Source Wizard (ASP.NET MVC)
                                Register Types for Object Data Source Wizard (ASP.NET Core)