Skip to main content

Data Range Selection and Visualization Models

  • 3 minutes to read

The data range selection and visualization model (the data range model for short) determines the range control‘s designation, and therefore the scale(s) displayed by the ruler, its upper and lower bounds, used data value types, measurement units, etc.

Without a data range model, which can be assigned by using the ClientPropertiesClass or ClientPropertiesClassName property, the range control is unusable and displays no content:

The core data range-related settings provided by the assigned data range model are available via the range control’s ClientProperties property:

  • The lower and upper bounds of the data range available for selection either by end-users or programmatically (ClientProperties.MinValue and ClientProperties.MaxValue);

  • The distance between tickmarks on the currently displayed or primary scale (ClientProperties.ScaleInterval).

In addition to the aforementioned settings, each data range model provides a unique set of options allowing you to manage scales, customize the range control’s ruler appearance, etc. These model-specific settings are available via the same ClientProperties property. To access them, however, you need to cast the property value to the corresponding data range model type.

Currently, the range control provides four data range models implemented by the corresponding classes. To activate a specific data range model, assign its class name to the range control’s ClientPropertiesClass property:

Data Range Model Data Range Model Class Example
Numeric TdxRangeControlNumericClientProperties
Date/Time TdxRangeControlDateTimeClientProperties
Date/Time Header TdxRangeControlDateTimeHeaderClientProperties
Scheduler TcxSchedulerRangeControlClientProperties

Numeric Model

The Numeric data range model, implemented as a TdxRangeControlNumericClientProperties object, allows you to select ranges of integer, float, or currency values.

To specify the actual data range type employed by the range control, use its ClientProperties.RangeValueType property.

Date/Time Model

The Date/Time data range model, implemented as a TdxRangeControlDateTimeClientProperties object allows you to select ranges of values on a single predefined scale displaying formatted TDateTime values.

To specify the scale displayed on the range control’s ruler, use the control’s ClientProperties.Scale property.

Date/Time Header Model

The Date/Time Header data range model, implemented as a TdxRangeControlDateTimeHeaderClientProperties object, allows you to select ranges of date/time values by using one or more predefined scales graduated in various measurement units.

To specify which scales are displayed on the range control’s ruler, use the control’s ClientProperties.Scales property. The scale that determines the minimum selectable date/time range (and, therefore, the measurement unit used by the range control), is determined by the range control’s ClientProperties.PrimaryScale property.

Scheduler Model

The Scheduler data range model, implemented as a TcxSchedulerRangeControlClientProperties object, allows you to select and display ranges of date/time values in the TcxScheduler control associated with the range control.

Since the Scheduler data range model is supported by the Scheduler control via the IdxRangeControlClient interface, the states of both associated controls are automatically updated in response to changes made in either of them by default.

Specifying a TcxScheduler object as the range control’s Client property value automatically assigns the Scheduler data range model to the control.