Skip to main content

IObjectDataSourceWizardTypeProvider.GetAvailableTypes(String) Method

Returns the list of types to display in the Report Wizard and Data Source Wizard.

Namespace: DevExpress.DataAccess.Web

Assembly: DevExpress.DataAccess.v23.2.dll

NuGet Packages: DevExpress.DataAccess, DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap

Declaration

IEnumerable<Type> GetAvailableTypes(
    string context
)

Parameters

Name Type Description
context String

For internal use.

Returns

Type Description
IEnumerable<Type>

The list of types to display in the Report Wizard and Data Source Wizard.

Remarks

The Report Wizard and Data Source Wizard sort types alphabetically. They use the type’s namespace and name. If you apply the DisplayName attribute to a type, the specified display name is used instead.

DisplayName is Not Applied DisplayName Is Applied

The code sample below shows how to implement the GetAvailableTypes method.

using System;
using System.Collections.Generic;
using DevExpress.DataAccess.Web;
// ...
public class CustomObjectDataSourceWizardTypeProvider : IObjectDataSourceWizardTypeProvider {
    public IEnumerable<Type> GetAvailableTypes(string context) {
        return new[] {
            typeof(SampleObjectTypes.DataSource),
            typeof(SampleObjectTypes.DataSource2)
        };
    }
}
See Also