FormDataSource.displayOption(Common, FormRowDisplayOption) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the text color and the background color for a record in the data source.
public:
virtual void displayOption(Microsoft::Dynamics::Ax::Xpp::Common ^ _record, Dynamics::AX::Application::FormRowDisplayOption ^ _options);
public virtual void displayOption (Microsoft.Dynamics.Ax.Xpp.Common _record, Dynamics.AX.Application.FormRowDisplayOption _options);
abstract member displayOption : Microsoft.Dynamics.Ax.Xpp.Common * Dynamics.AX.Application.FormRowDisplayOption -> unit
override this.displayOption : Microsoft.Dynamics.Ax.Xpp.Common * Dynamics.AX.Application.FormRowDisplayOption -> unit
Public Overridable Sub displayOption (_record As Common, _options As FormRowDisplayOption)
Parameters
- _record
- Common
The FormRowDisplayOption object that encapsulates the desired record display properties.
- _options
- FormRowDisplayOption
The FormRowDisplayOption object that encapsulates the desired record display properties.
Remarks
This method is executed one time for each record before the record is displayed in a form. The displayOption method can be overridden on a form data source. Right-click the Methods node under the data source, point to Override Method, and then click displayOption.
The following example overrides the displayOption method to set display options from a stored profile and to override the background color that is based on the settings for the particular record.
public void displayOption(Common _record, FormRowDisplayOption
_options)
{
JmgProfileTable profile;
profile = _record;
_options.backColor(profile.Color);
super(_record, _options);
}