Conditional Styles


Conditional Styles contain conditions that are evaluated in a Browser using Javascript.

This makes it possible to dynamically style controls without having to make Ajax callbacks. For example, if a user enters an exceedingly large value into a Quantity field, the entry can immediately be displayed in red to show it is too big. In contrast to 'client-side' conditional styles, 'server-side' conditional styles use conditions that are expressed using Xbasic expressions. These conditions are then evaluated on the server. This video shows how client-side conditional styles can be used to display a different font and background color depending for different ranges of values.

Conditional styling for a Grid row, checked rows are red. Unchecked rows are black.

Example: Using a Javascript Function