Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Grid for Microsoft .NET User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

5.3 Features

The following sections describe features of the .NET cell control functionality in Objective Grid for Microsoft .NET.

5.3.1 .NET Controls Can Be Used as Cell Editors

Any properly functioning .NET control can be used as a cell editor in Objective Grid for Microsoft .NET. You can use the .NET controls shipped with Microsoft Visual Studio .NET or create your own custom controls for use as cell editors. You can also embed a Objective Grid for Microsoft .NET GridControl object in grid cells.

Using a .NET control as a cell editor requires the following four steps:

  1. Create an instance of the .NET control that you want to use as a grid cell editor.

  2. Register the control with the GridControl instance that will use it as a cell editor. Do this using the GridControl.RegisterControl method. It returns a CellControl instance.

  3. Assign the resulting CellControl instance to the CustomControl property of a Style object.

  4. Apply the Style to the GridControl using SetStyleRange.

5.3.2 Memory Resources Are Conserved

To conserve memory resources, only one instance of any .NET control is maintained for use as a grid cell editor. For example, if a .NET TextBox control is used as a cell editor for the entire grid table, only one instance of the TextBox control is maintained. It is automatically positioned, sized, initialized, and drawn in each cell as it becomes the current cell.

5.3.3 Style Manipulation Code Is Usually Not Needed

By default, the Text property for your .NET control is set to the Style.Value setting for the cell when it is initialized as the current cell. When cell editing is completed, the Text property for your control is stored back to the grid's Style.Value property for the cell. This, in many cases, eliminates the need to write any style manipulation code.

5.3.4 Cell Control Behavior Can Be Monitored and Customized

The behavior of your .NET cell control can be monitored and customized using the various properties and events associated with the CellControl class. The following are examples of the kinds of behaviors that can be configured using CellControl properties and events:

5.3.5 Cell Editing Events Can Be Monitored

You can choose to handle cell editing events by monitoring the CellControl events directly or by monitoring the corresponding GridControl events. For example, the StartEditing event for a cell control can be monitored using the CellControl.StartEditing event or via the GridControl.StartEditing event.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.