Skip to main content
A newer version of this page is available. .

DataControlBase.DesignTimeDataObjectType Property

Gets or sets the type of objects stored in a data source. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v19.1.Core.dll

Declaration

public Type DesignTimeDataObjectType { get; set; }

Property Value

Type Description
Type

The Type of data objects.

Remarks

The DXGrid provides design-time enhancements, allowing you to customize the unbound grid. Use the DesignTimeDataObjectType property to specify the type of data objects contained in a data source assigned to the grid at runtime.

The DesignTimeDataObjectType property can be set in one of the following ways using the Properties window:

  • Namespace.TypeName,AssemblyName
  • Namespace.TypeName

    The first found assembly which contains the specified type, is used.

  • TypeName

    The first found namespace which contains the specified type, is used.

Once this property is specified, and if the DataControlBase.AutoPopulateColumns option is enabled, the gird renders sample columns for each public property in the specified type. To populate the GridControl.Columns collection, press the Populate Columns button, displayed within the Quick Customization Panel.

grid_designtime_qcpanel

The order of columns is the same as the order of public properties. The grid automatically creates an editor for a column, based on the type of its values. For instance, if a column is bound to a field that contains DateTime values, the grid creates a date editor for it. If a column is bound to a field that contains numeric or Boolean data, the numeric or check editor is used, respectively. Otherwise, the text editor is used.

To learn more, see Customizing Unbound Grid at Design-Time.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DesignTimeDataObjectType property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also