WinForms Grid and TreeList: Using Advanced UI Controls within Data Cells

Thinking Out Loud
13 November 2014

One of the many features that sets our WinForms product line apart from others is the rich set of in-place cell editors we ship for controls such as the XtraGrid and XtraTreeList. From standard text boxes to progress bars - advanced lookups to sparklines, we've done our very best to provide a broad range of UI options for your data editing and cell presentation needs.

Over the years, however, we've learned that no matter how many in-place editors we create (and if you currently use our WinForms products, you know that we ship a lot of editors), there will be a few use-cases that our editors cannot directly address. In this upcoming release, we've taken steps to solve this dillema and give you the ability to embed custom editors for all your cell editing and data presentation needs.

The following image should give you a sense of the possibilities available to you once we release this feature in early December.

WinForms Data Grid Custom Cell Editors

As you can see, we've created a custom cell editor by using our WinForms Chart Control.

How it Works

In order to embed a custom control within the Grid or TreeList, you'll need to implement the dedicated IAnyControlEdit interface. This interface provides a straightforward way to pass a cell's value to the custom editor, calculate the control's size, perform initialization and any manual painting. The custom control can then be assigned to the target column using a RepositoryItemAnyControl object.

Infinite Possibilities

To help you visualize the potential uses for custom cell editors, this release will include updates to our Gauge Control - allowing you to display gauges directly within grid cells. Like all custom cell editors, the Gauge Control control implements the IAnyControlEdit interface and can be embedded into the DevExpress WinForms Data Grid using the RepositoryItemAnyControl object.

WinForms Data Grid Embedded Gauge Control

Note the new gauge type we've created for this release - it will be available as part of our WinForms Gauge Control Library and is being used in this sample within the Data Grid's Layout View.

As always, we welcome your comments and feedback. Let us know what you think.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.