- Name DropDown
- CSS Class CC_DropDown
- Types int Index, string Value, string Text
The DropDown creates a basic HTML SELECT object and has a simple series
of Add methods to allow you to populate it.
Because Chan (unlike standard ASPX) does not have a built in viewstate
the DropDown will forget its contents whenever the page is loaded or
posted back. For this reason you will need to populate it in Page_Init().
However you are free to inherit from the DropDown and
use its own Control.Init() to populate it with a set series of values,
for example.
| Qualifiers |
Type |
Name |
Default |
Description |
| required |
string |
id |
"" |
Unique identifier within the page for the control |
|
string |
Size |
"thin" |
Choice of Thin,Norm or Wide CSS sizes, corresponding to .C__Thin, .C__Norm and .C__Wide respectively |
|
bool |
Enabled |
true |
Wether or not the control is enabled within the page, directly mapped onto the HTML disabled property. |
|
bool |
Visible |
true |
Wether or not the control is rendered into the page's HTML. |
|
bool |
Mandatory |
false |
Wether or not the control is allowed to hold a value of "" or String.Empty. |
|
string |
Text |
"" |
The visible Text that is currently selected, if set to a Text value that does not exist it will fall back to non-selected |
|
string |
Value |
"" |
The value that is currently selected, if set to a value that does not exist it will fall back to non-selected |
|
int |
Index |
-1 |
The currently selected item index, if set to a value out of bounds will fall back to -1 : non-selected |
| Qualifiers |
Type |
Name |
Params |
Description |
|
|
Add |
(string Text) |
Add an item to the drop down, this overload creates an entry where the Value is the same as the Text |
|
|
Add |
(string Value , string Text) |
Add an item to the drop down, this overload can be used to create "null" entries by setting Value to "" |
|
|
Add |
(object Value , objecy Text) |
Add an item to the drop down, this overload automatically calls ToString() on the passed in objects, and treats null and DBNull as "" |