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.v20.1.Core.dll

Declaration

public Type DesignTimeDataObjectType { get; set; }
Public Property DesignTimeDataObjectType As Type

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.

See Also