Column Object | MAIN PAGE |
The Column Object represents a specific
column in the Grid. It is through this object that you set various properties
of individual columns including size, color, font, default value, list
of options (if applicable), etc.
PROPERTIES | |
Header | Returns this column's Header object. This property is read-only. |
Cell | Returns this column's Cell object. This property is read-only |
Index | Returns the 1-based index of this column |
Caption = String | Sets the caption that will be displayed for the specific Column. By default the name specified in the SQL statement is displayed as the column's caption. |
Hidden = Boolean | Setting this property to True, hides the specific column. By default the value is False i.e. all columns are displayed. |
ReadOnly = Boolean | Setting this property to True causes the specified column to be rendered Non-Editable. By default the property is set to False. |
CanSort = Boolean | Setting this property to True
causes "arrow up" and "arrow down" buttons to be displayed in the header
of this column. By default this property is set to False.
By clicking the "arrow up" button the records are displayed in ascending
order of the values in that column. By Clicking the "arrow down"
button, the records are displayed in the descending order of the values
in that column..
NOTE:
|
DefaultValue = Object | When this property is set for hidden, read-only, and blank columns, the specified value will be stored in the database. |
Array = Variant Array | Setting this property causes a drop-down
list box to be displayed for the specific column whenever the Grid is in
Edit or Add mode. The list box will display the values specified in the
Variant Array.
Note:
|
VArray = Variant Array | This method gives correct functionality
only with Array
property set. The values specified in the Variant Array of the Array property, are displayed in the list box whereas, the corresponding values specified in Variant Array of the VArray property are stored in the database. e.g. : Grid.Cols(2).Array =Array("Single",
"Married", "Divorced")
In the above example the values displayed in the list box are Single, Married and Divorced. Whenever the user selects Single the value stored in the database would be 1, 2 for Married, and 3 for Divorced. |
FormHTML | Returns an HTML input tag if BuildForm method of the main Grid object has been called, otherwise an empty String is returned. See Sample 5 for a working example. |
FieldName = String | On setting this property, iASP_Grid will use the specified fieldname to perform all operations such as ORDER BY clause, on the database. |
METHODS | |
FormatNumeric(int decimals, Boolean ShowCommas) | Use this method to format numeric
data displayed in a column according to the specified parameters.
Parameters: Decimals - the number of accepted
decimal places in the number.
e.g. Grid.Cols(5).FormatNumeric 2, TrueNote: The numeric data will be stored in the data base without commas. |
FormatNumeric(int decimals) | Use this method to format numeric
data displayed in a column according to the specified parameters.
Parameters: Decimals - the number of accepted decimal places in the number. e.g. Grid.Cols(5).FormatNumeric 2, TrueNote: The numeric data will be stored in the data base without commas. |
AttachForeignTable(String SQL, int KeyColumn , int DisplayColumn) | This method displays a drop-down
list box in the column whenever that grid is in the Edit/Add mode. The
values displayed in the list box are retrieved from a foreign table.
Parameters: SQL - the SQL statement that
obtains the list of values from a foreign table.
e.g.: |
AttachCheckBox(String DisplayChecked , String DisplayUnchecked) | This method causes a check box to
be displayed in the column in the Edit/Add mode. This method is used for
fields that only store a non-zero value (true) and a zero (false).
In the non- Edit/Add mode, the specified String values (DisplayChecked/DisplayUnChecked) are displayed in the column. Parameters: DisplayChecked - The specified String is displayed in the column when the Grid is in the non- Edit/Add mode and the corresponding value in the database is non-zero. DisplayUnchecked - The specified String is displayed in the column when the Grid is in the non- Edit/Add mode and the corresponding value in the database is zero. e.g.: |
AttachTextArea(String Rows, String Cols) | This method causes a text Area to
be displayed in the column in the Edit/Add mode.
Parameters: Rows - the ROWS attribute of the <TEXTAREA> tag. Cols - the COLS attributes of the <TEXTAREA> tag. e.g.: |
AttachTextArea( ) | This method causes a text Area to be displayed in the column in the Edit/Add mode. |
If you require technical support please send complete details about the problem you are having to support@halcyonsoft.com.
Copyright 1998-2000, Halcyon
Software Inc. All rights reserved.