次の方法で共有


AxDataSource

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

An AxDataSource component provides access to a data set in the AOT. The other components of the User Control will use the AxDataSource when retrieving or saving data in the data set.

Properties

The AxDataSource component has the following properties:

Property

Description

DataSetName

The data set the control is bound to.

EnableViewState

Indicates whether the control automatically saves its state for use in round-trips.

Expressions

The expressions that are bound to properties of the control.

ID

The programmatic name of the control.

PersistState

When set to true, enables the control to persist state information for the dataset. Information persisted includes the following:

  • Dataset metadata

  • Calculated field values

  • Ax queries that are initially generated using the data source metadata

  • Temporary tables

  • Cursor position (active record) within each table

  • Uncommitted record buffer for the active record

The default value is true.

ProviderView

The view in the data set that is being used for the current context.

Role

Sets the context behavior for the data source. It can be one of the following values:

  • None - No context behavior

  • Provider - Data source provides context to other web parts

  • Consumer - Data source receives context from other web parts

  • ProviderConsumer - Data source provides context to other web parts and receives context from other web parts.

A User Control can have multiple AxDataSource components. A maximum of one AxDataSource component for the User Control can act as a context provider. Multiple AxDataSource components can act as context consumers.

SuppressDeleteConfirmationDialog

When set to true, the dialog to confirm delete operations will not be displayed.

Events

The AxDataSource component has the events listed in the following table.

Event

Description

CreatingDataSetRun

Occurs when a data set is created or unpacked.

DataBinding

Occurs when the server control binds to a data source.

DataSetDetached

Occurs when the data set is detached from the control.

DataSetReady

Occurs after the RunningDataSetRun event, when the data set has been initialized and is ready for access.

InitializedDataSetRun

Occurs when the data set is initialized, after the CreatingDataSetRun event.

RunningDataSetRun

Occurs after the InitializedDataSetRun event.

Disposed

Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.

Init

Occurs when the server control is initialized, which is the first step in its lifecycle.

Load

Occurs when the server control is loaded into the System.Web.UI.Page object.

PreRender

Occurs after the System.Web.UI.Control object is loaded by prior to rendering.

Unload

Occurs when the server control is unloaded from memory.

See also

Data Access Overview