Objective Grid for Microsoft .NET includes a number of pre-defined controls that can be inserted into grid cells. These controls are used in a cell by setting a property in the cell's style. The ControlType enumeration contains identifiers for all of the pre-defined controls available for use, and the Control property of the Style class inserts a custom control into a cell.
The following code snippets show how to insert a drop-down control into a grid cell. The drop-down control contains the items "Rogue", "Wave", and "Stingray".
C#:
Style style = new Style(); style.Control = Stingray.Grid.ControlType.DropDown; style.ChoiceList = "Rogue\nWave\nStingray"; gridControl1[1,1].Style = style; |
Visual Basic:
Dim style As New Style() style.Control = Stingray.Grid.ControlType.DropDown Dim str As New System.Text.StringBuilder() str.Append("Rogue") str.Append(Chr(10)) str.Append("Wave") str.Append(Chr(10)) str.Append("Stingray") str.Append(Chr(10)) style.ChoiceList = str.ToString() GridControl1(1, 1).Style = style |
Table 16 lists the custom controls available in Objective Grid for Microsoft .NET, and their corresponding ControlType enumerations.
Control | Description |
Label | Static Label Control |
Header | Header Control similar to Row and Column Headers |
TextBox | TextBox Control |
SpinEdit | Spin Control |
ScrollEdit | TextBox with a Scroll Bar |
HotSpotEdit | TextBox with a HotSpot Button |
RichEdit | RichEdit Control, helps formatting individual characters |
MaskEdit | Standard Mask Edit Control |
Password | Password Edit control |
Button | Push button |
RadioButton | Radio button |
Checkbox | Check box control |
ListBox | List box |
DropDown | Drop down |
DropDownList | Drop down list |
TabbedDropDown | Tabbed drop down |
TabbedDropDownList | Tabbed drop down list |
ComboBox | ComboBox |
ValidatedComboBox | ComboBox, permits entering a string, which is available as one of the choices |
TabbedComboBox | Tabbed combo box |
CheckListComboBox | ComboBox with CheckBox for each choice |
ZeroBasedComboBox | Returns the index of the selected choice with zero as the starting index |
OneBasedComboBox | Returns the index of the selected choice with one the starting index |
ZeroBasedComboBoxEx | Zero-based combo box |
OneBasedComboBoxEx | One-based combo box |
DateTime | DateTime Control with Calendar for input |
DateTimeNoCalendar | DateTime Control without Calendar for input |
Currency | Currency Text Box |
ProgressBar | Progress bar |
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.