MList
From RadPHP XE2 Documentation
MList is a dynamic list you can fill with data, either manually, through its Items property, or with a database connection.
Contents |
Usage
PHP
Fill From a Datasource
You can fill a MList from a Datasource component with a function like this one:
function fillListBox($sender, $params) { $this->DataSource1->DataSet->first(); while( ! $this->DataSource1->DataSet->EOF ) { $this->MList1->AddItem($this->DataSource1->DataSet->Fields["column_name"]); $this->DataSource1->DataSet->next(); } }
You can call it from your form’s onBeforeShow event.
Properties
MList Properties
| Name | Values | Description |
| DataMapping
| array | Associate the names of the columns to be retrieved from the DataSource to available fields on the MList component:
|
| DataSource
| DataSource | Connector to a DataSet component with rows to fill the list. |
| DividerTheme
| MobileTheme | Theme and color variation associated with list dividers, list’s section headers. |
| ExtraButtonTheme
| MobileTheme | Theme and color variation associated with items extra button. |
| Icon
| image | Custom icon to be used for items extra button. |
| ParentColor
| boolean | Whether or not Color property value should be inherited from MList’s parent component. |
| ParentFont
| boolean | Whether or not Font property value should be inherited from MList’s parent component. |
| SystemIcon
| system icon code | System icon to be used for items extra button. |
| Theme
| MobileTheme | Theme and color variation associated with the list. |
| Type
| tOrdered tUnordered | Whether the list should me ordered (tOrdered) or not (tUnordered). |
| isFiltered
| boolean | Whether there should be a filter (search) field in the top of the list or not. |
| isWrapped
| boolean | Whether list should have the appearance of a group or not, just a common list. When grouped, list squares are rounded. |
Item Properties
Each item on the list has also some properties you can work with.
| Name | Values | Description |
| Caption
| text | Text to be displayed in the item. HTML tags are allowed. |
| Link
| URL | Address of the page to be loaded. |
| MList
| MList | Existing MList component to be nested in the list. |
| ExtraButtonHint
| text | Alternative text for the extra button. |
| ExtraButtonLink
| URL | Address extra button points to. Extra button will only be present in the item if this property has a value. |
| IsDivider
| boolean | Whether the item is a list divider or not. |
| CounterValue
| number | Number to be displayed on the right side of the item. |
| Thumbnail
| image | Image to be displayed on the right side of the item. |
| IsIcon
| boolean | Whether image value of Thumbnail is an icon or not. It will affect the way it is displayed. |
Mobile Components Common Properties
These properties are shared by all mobile components:
| Name | Values | Description |
| Enhancement
| enFull enStructure None | Determines component visual appearance. enFull will use JQuery Mobile default style, or a MobileTheme if there is one associated to the component. You will need to set this property to enStructure if you want it to use the style you defined through component properties other than MobileTheme, such as Font or Color. enNone will leave the component with its default appearance (no style at all). |