Skip to main content

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.v23.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public Type DesignTimeDataObjectType { get; set; }

Property Value

Type Description
Type

The Type of data objects.

Remarks

The GridControl includes design-time enhancements that allow you to customize an 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 that contains the specified type is used.

  • TypeName

    The first found namespace that contains the specified type is used.

Once this property is specified, and if the DataControlBase.AutoGenerateColumns option is enabled, the grid renders sample columns for each public property in the specified type. To populate the GridControl.Columns collection, click the Generate Columns button displayed in the Quick Actions menu.

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.

Refer to the following help topic for more information: Customize Unbound Grid at Design-Time.

See Also