DataSourceDesigner Class
Assembly: System.Design (in system.design.dll)
The DataSourceDesigner class is the base class for data source designers, such as the SqlDataSourceDesigner, AccessDataSourceDesigner, and ObjectDataSourceDesigner classes. If you create a new kind of data source control, you might also want to create a custom control designer for your control, and then derive it from the DataSourceDesigner class.
The DataSourceDesigner class has two event methods: the OnDataSourceChanged and OnSchemaRefreshed methods. Both of these classes can be temporarily disabled with the SuppressDataSourceEvents method, which sets the SuppressingDataSourceEvents property. Then, the event methods can be enabled again with the ResumeDataSourceEvents method.
There are two static methods that you can use to evaluate the equivalency of schemas or views without creating an instance of the class:
-
The SchemasEquivalent method compares two schemas.
-
The ViewSchemasEquivalent method compares the schemas of two views.
The following code example shows how to use a custom data source control with several other small custom classes, as listed in the following table.
| Custom class | Derived from |
|---|---|
| CustomDataSource | |
| CustomDataSourceDesigner | DataSourceDesigner |
| CustomDataSourceView | |
| CustomDesignDataSourceView | |
| BookListViewSchema | |
| CustomIDFieldSchema | |
| CustomTitleFieldSchema | IDataSourceFieldSchema |
| BookItem (A two-field data structure.) |
|
After compiling the code example, in Design view, open the .aspx page, then set the DataSourceID property to the ID of the custom data source control.
- SecurityPermission for calling unmanaged code. Demand value: Demand. Permission value: UnmanagedCode
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.