DataSourceDesigner.CanRefreshSchema Property

Definition

Gets a value indicating whether the RefreshSchema(Boolean) method can be called.

public virtual bool CanRefreshSchema { get; }

Property Value

true if the RefreshSchema(Boolean) can be called; otherwise, false. The default is false.

Implements

Remarks

Use the CanRefreshSchema property in a derived class to enable or disable the ability to refresh the schema at design time for a specific data source. If your application requires an invariant data structure and the schema will never change, you want the CanRefreshSchema property to return false.

A design host such as Visual Studio 2005 uses the CanRefreshSchema property to determine whether a command to refresh the schema appears in the action list menu at design time.

In a design host such as Visual Studio 2005, you can see the CanRefreshSchema property in action by completing the following process:

  1. On your page, place a SqlDataSource or an AccessDataSource control.

  2. In Design view, on the action list, click Configure.

  3. Remove a few fields from the data source.

  4. On the action list, click Refresh Schema.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also