Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Views
   [Expand]Grid View Data Layout
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Selection
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Expand]Focus and Navigation
   [Expand]Conditional Formatting
   [Expand]Drag-and-Drop
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Miscellaneous
   [Expand]Performance Improvement
   [Collapse]Design-Time Features
     Drag and Drop Data Binding
     Simplified Data Binding
     Customizing Unbound Grid
     Using the GridControl Tasks Smart Tag Panel
     Feature Browser
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Customizing Unbound Grid

The DXGrid provides design-time enhancements allowing you to automatically create columns for all fields in a data source to which the grid is bound at runtime. You should do the following:

Expanded Specify the Type of Data Objects

Specify the type of data objects using the DataControlBase.DesignTimeDataObjectType property. This property can be set in the following ways:

  • 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, if the DataControlBase.AutoPopulateColumns option is enabled, the gird renders sample columns for each public property in the specified type so that you can see how the grid will look like at runtime.

Expanded Populate Columns

To populate the GridControl.Columns collection, invoke the grid's smart tag panel and click the Generate Columns item. The order of columns is the same as the order of public properties.

Expanded Customize Edit Settings

If a column's editor isn't specified, the grid automatically creates it at runtime, based on the type of column 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 created.

To specify the type of a column's editor, select the column, invoke its smart tag panel and modify the EditSettings property value.

Is this topic helpful?​​​​​​​