Difference between revisions of "Grid Gadget Attributes"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 128: | Line 128: | ||
|- | |- | ||
|valign="top"|[[Data Attributes#Data source|Data source]]||The table or SQL SELECT statement to display in the grid. | |valign="top"|[[Data Attributes#Data source|Data source]]||The table or SQL SELECT statement to display in the grid. | ||
+ | |valign="top"|controlSource||valign="top"|Character | ||
|- | |- | ||
|valign="top"|[[Data Attributes#Editable|Editable]]||Data is editable (True | False) | |valign="top"|[[Data Attributes#Editable|Editable]]||Data is editable (True | False) | ||
+ | |valign="top"|editable||valign="top"|Boolean | ||
|- | |- | ||
|valign="top"|[[Data Attributes#Hide OK/Cancel Buttons|Hide OK/Cancel Buttons]]||Hide the OK/Cancel buttons (True | False) | |valign="top"|[[Data Attributes#Hide OK/Cancel Buttons|Hide OK/Cancel Buttons]]||Hide the OK/Cancel buttons (True | False) | ||
+ | |valign="top"|gridHideOkCancelButtons||valign="top"|Boolean | ||
|- | |- | ||
|valign="top"|[[Data Attributes#Hide actionbar|Hide actionbar]]||Hide actionbar buttons (True | False) | |valign="top"|[[Data Attributes#Hide actionbar|Hide actionbar]]||Hide actionbar buttons (True | False) | ||
+ | |valign="top"|gridHideActionbar||valign="top"|Boolean | ||
|- | |- | ||
|valign="top"|[[Data Attributes#Filter|Filter]]||The filter expression that restricts the records that will be included in the grid | |valign="top"|[[Data Attributes#Filter|Filter]]||The filter expression that restricts the records that will be included in the grid | ||
+ | |valign="top"|filter||valign="top"|Character | ||
+ | |- | ||
+ | |valign="top"|[[Data Attributes#Refresh section when row changes|Refresh section when row changes]]||Refresh other fields in the section when row changes (True | False) | ||
+ | |valign="top"|refreshOnGridClick||valign="top"|Boolean | ||
|- | |- | ||
|valign="top"|[[CSS|CSS style]]||CSS style for the gadget (separate attributes with ; or use app:/filename.css) | |valign="top"|[[CSS|CSS style]]||CSS style for the gadget (separate attributes with ; or use app:/filename.css) | ||
+ | |valign="top"|gadgetCssStyle||valign="top"|Character | ||
|- | |- | ||
|valign="top"|[[Data Attributes#Pagination|Pagination]]||Grid is always rendered using pagination (for large data sets)(True | False) | |valign="top"|[[Data Attributes#Pagination|Pagination]]||Grid is always rendered using pagination (for large data sets)(True | False) | ||
+ | |valign="top"|pagination||valign="top"|Boolean | ||
|- | |- | ||
|valign="top"|[[Data Attributes#Automatic pagination|Automatic pagination]]||Grid is rendered using pagination if the number of records exceeds below amount (True | False) | |valign="top"|[[Data Attributes#Automatic pagination|Automatic pagination]]||Grid is rendered using pagination if the number of records exceeds below amount (True | False) | ||
+ | |valign="top"|autoPagination||valign="top"|Boolean | ||
|- | |- | ||
|valign="top"|[[Data Attributes#Automatic pagination size|Automatic pagination size]]||Grid is rendered using pagination if Automatic pagination is true and the number of records exceeds this amount | |valign="top"|[[Data Attributes#Automatic pagination size|Automatic pagination size]]||Grid is rendered using pagination if Automatic pagination is true and the number of records exceeds this amount | ||
+ | |valign="top"|autoPaginationSize||valign="top"|Int | ||
|- | |- | ||
|valign="top"|[[Data Attributes#Grid row height|Grid row height]]||Height of the grid rows | |valign="top"|[[Data Attributes#Grid row height|Grid row height]]||Height of the grid rows | ||
+ | |valign="top"|gridRowHeight||valign="top"|Int | ||
|- | |- | ||
|valign="top"|[[Colors|Background color]]||The background color for the gadget | |valign="top"|[[Colors|Background color]]||The background color for the gadget | ||
+ | |valign="top"|gadgetBackColor||valign="top"|Character | ||
|- | |- | ||
|valign="top"|[[Colors|Foreground color]]||The foreground color for the gadget | |valign="top"|[[Colors|Foreground color]]||The foreground color for the gadget | ||
+ | |valign="top"|gadgetForeColor||valign="top"|Character | ||
|- | |- | ||
|} | |} |
Revision as of 11:40, 7 July 2016
Contents
Getting and Setting Attributes
The setAttribute(name, value) method can be used to set the value of an Attribute:
Lianja.get("pageid.sectionid.fieldid").setAttribute("caption","Formitem1")
Note: the shortened form setAttr(name,value) is also available.
The getAttribute(name) method can be used to get the value of an Attribute:
cTitle = Lianja.get("pageid.sectionid.fieldid").getAttribute("caption")
Note: the shortened form getAttr(name) is also available.
Details
Attribute | Description | Name | Type |
---|---|---|---|
Name | The name for this gadget (unique to the section) | id | Character |
Meta types | A comma separated list of metatype names | metatypes | Character |
Type | The type of control: Gadget (readonly) | type | Character |
Gadget type | The type of gadget: grid (readonly) | gadgetType | Character |
Margin | Margin size around the gadget | gadgetMargin | Int |
Fixed width | Fixed gadget width in pixels | gadgetFixedWidth | Int |
Fixed height | Fixed gadget height in pixels | gadgetFixedHeight | Int |
Inline | Render the gadget inline rather than it its own column (True | False) | gadgetInline | Boolean |
Stretch width | Auto stretch the width of the gadget into the width of the section (True | False) | gadgetStretchWidth | Boolean |
Geometry
Attribute | Description | Name | Type |
---|---|---|---|
Absolute | Enable or disable absolute positioning (True | False) | absolutePosition | Boolean |
Top | Top position in pixels | absolutePositionY | Int |
Left | Left position in pixels | absolutePositionX | Int |
Width | Width in pixels | absolutePositionWidth | Int |
Height | Height in pixels | absolutePositionHeight | Int |
CSS style | CSS style (separate attributes with ; or use app:/filename.css) | cssStyle | Character |
Caption
Attribute | Description | Name | Type |
---|---|---|---|
Caption | The caption for the gadget | caption | Character |
Background color | The background color for the caption | backColor | Character |
Foreground color | The foreground color for the caption | foreColor | Character |
Font | The font for the caption | captionFont | Character |
Icon | The image for the caption (png | jpg | gif). Use app:/imagename.ext for app specific images. |
captionIcon | Character |
Border width | The caption border width | captionBorderWidth | Int |
Border color | The caption border color | captionBorderColor | Character |
Transparency | Specify a transparency percentage from 0 to 100 | transparency | Int |
Gradient colors | Render the caption color as a gradient (True | False) | captionGradient | Boolean |
Gradient type | Specify the gradient type | captionGradientType | Int |
Gradient start color | Gradient start color | captionFromColor | Character |
Gradient end color | Gradient end color | captionToColor | Character |
Data
Attribute | Description | Name | Type |
---|---|---|---|
Data source | The table or SQL SELECT statement to display in the grid. | controlSource | Character |
Editable | Data is editable (True | False) | editable | Boolean |
Hide OK/Cancel Buttons | Hide the OK/Cancel buttons (True | False) | gridHideOkCancelButtons | Boolean |
Hide actionbar | Hide actionbar buttons (True | False) | gridHideActionbar | Boolean |
Filter | The filter expression that restricts the records that will be included in the grid | filter | Character |
Refresh section when row changes | Refresh other fields in the section when row changes (True | False) | refreshOnGridClick | Boolean |
CSS style | CSS style for the gadget (separate attributes with ; or use app:/filename.css) | gadgetCssStyle | Character |
Pagination | Grid is always rendered using pagination (for large data sets)(True | False) | pagination | Boolean |
Automatic pagination | Grid is rendered using pagination if the number of records exceeds below amount (True | False) | autoPagination | Boolean |
Automatic pagination size | Grid is rendered using pagination if Automatic pagination is true and the number of records exceeds this amount | autoPaginationSize | Int |
Grid row height | Height of the grid rows | gridRowHeight | Int |
Background color | The background color for the gadget | gadgetBackColor | Character |
Foreground color | The foreground color for the gadget | gadgetForeColor | Character |
Other Options
Attribute | Description | Name | Type |
---|---|---|---|
Hide header | Hide gadget header at runtime (True | False) | gadgetHideHeader | Boolean |
Custom Delegates
Attribute | Description | Name | Type |
---|---|---|---|
Init | The delegate for the Init event | ||
Load | The delegate for the Load event | ||
Ready | The delegate for the Ready event | ||
Activate | The delegate for the Activate event | ||
Deactivate | The delegate for the Deactivate event | ||
Change | The delegate for the Change event | ||
Before Data Create | The delegate for the BeforeCreated event | ||
After Data Create | The delegate for the AfterCreated event | ||
After Data Changed | The delegate for the dataChanged event (after data is read) | ||
Before Data Update | The delegate for the BeforeUpdate event | ||
After Data Update | The delegate for the AfterUpdate event | ||
Before Data Delete | The delegate for the BeforeDelete event | ||
After Data Delete | The delegate for the AfterDelete event | ||
Refresh | The delegate for the Refresh event | ||
Parent data changed | The delegate for the ParentDataChanged event | ||
Click | The delegate for the item Clicked event. | ||
Double click | The delegate for the dblClick event | ||
Sort | The delegate for the column Sort event fired when the header is clicked. This is called with two arguments: nColumn, nDirection | ||
Timer | The delegate for the Timer event | ||
Timer interval | The timer interval in seconds that the Timer event will be called at runtime |
Permissions and Roles
Attribute | Description | Name | Type |
---|---|---|---|
Read roles | A comma separated list of roles that can read (and view) the data. | permRead | Character |
Update roles | A comma separated list of roles that can perform update operations on the data. | permUpdate | Character |
UI Presentation Rules
Attribute | Description | Name | Type |
---|---|---|---|
Desktop | Include this gadget in a Desktop client (True | False). | desktopUI | Boolean |
Web | Include this gadget in a Web client (True | False). | webUI | Boolean |
Tablet | Include this gadget in a Tablet client (True | False). | tabletUI | Boolean |
Phone | Include this gadget in a Phone client (True | False). | mobileUI | Boolean |
UI States | UI states that affect this gadget. Specify multiple states as a comma separated list. | state | Character |
Initial UI state | The initial UI state for this gadget. | uiStateInit | Character |
Readonly when | Gadget is readonly at runtime if specified expression evaluates to true. | readonlyWhen | Character |
Visible when | Gadget is visible at runtime if specified expression evaluates to true. | visibleWhen | Character |
Display orientation | Display depending on mobile device orientation for Tablets and Phones. (Always | Portrait | Landscape) | displayOrientation | Character |
Apply rules on change | Apply UI presentation rules (Visible when and Readonly when) when data is changed interactively or when navigating records (True | False). | applyRulesOnChange | Boolean |