Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

StyleExpr Property

Microsoft Dynamics NAV 2013

Sets whether the format that is specified in the Style Property is applied to text in a field.

Dd983802.Important(en-us,NAV.70).gifImportant
For backward compatibility only: If set to a Boolean true or false, it sets whether the format specified in the Style property is applied to text in a field.

  • Page field controls that are not of type Boolean or BLOB.

Dd983802.note(en-us,NAV.70).gifNote
This property is not supported in the Microsoft Dynamics NAV Web client or web applications that run on Microsoft Dynamics NAV Portal Framework for Microsoft SharePoint 2010. If the page is displayed in a these display targets, the property is ignored.

You can set StyleExpr to either the name of a variable; a text constant in apostrophes, for example, ‘strong’; or, for backward compatibility, to true or false.

If the StyleExpr property evaluates to true, then the value of the field is formatted as specified by the Style Property. You can set the value to true or false, or you can use a variable that evaluates to true or false. The property's default value is false.

Dd983802.Important(en-us,NAV.70).gifImportant
You can use a conditional setting of styles by inserting the conditional code in, for example, the OnAfterGetRecord Trigger. Remember to cover all cases in else branches to avoid incorrect styles. For example: if (MyField = 'abc') then   MyStyleVar := 'Ambiguous' else   MyStyleVar := 'Favorable'

Dd983802.note(en-us,NAV.70).gifNote
To use a variable for the StyleExpr property, the IncludeInDataSet Property of the variable must be set to Yes.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.