From wiki.ginstr.com
Jump to: navigation, search
(Sort data)
m (formatting)
 
Line 10: Line 10:
 
===Sort data===
 
===Sort data===
  
;<code>[gn:act_sortListView]|[target,sortOrder,sortColumn]</code>
+
:;<code>[gn:act_sortListView]|[target,sortOrder,sortColumn]</code>
  
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
+
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Parameter
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| [[target]]
+
| <code>[[target]]</code>
 
| [[target]] where the data will be sorted
 
| [[target]] where the data will be sorted
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
** [[GnListView]]
+
** <code>[[GnListView]]</code>
 
|-
 
|-
| sortOrder
+
| <code>sortOrder</code>
 
| represents sorting order
 
| represents sorting order
: Can be
+
Can be
 
* hardcoded
 
* hardcoded
 
** <code>regular</code>
 
** <code>regular</code>
 
** <code>reverse</code>
 
** <code>reverse</code>
 
|-
 
|-
| [[configuration.xml#Column|sortColumn]]
+
| <code>[[configuration.xml#Column|sortColumn]]</code>
 
| represents sorting column
 
| represents sorting column
: Can be
+
Can be
 
* hardcoded
 
* hardcoded
 
|-
 
|-
Line 37: Line 37:
  
 
====Example====
 
====Example====
<code>@+id/lstDeviceOverview</code> - target<br>
+
:<code>@+id/lstDeviceOverview</code> - target<br>
<code>regular</code> - sort order<br>
+
:<code>regular</code> - sort order<br>
<code>device_buildingZone</code> - column name<br><br>
+
:<code>device_buildingZone</code> - column name<br>
<code>[gn:act_sortListView]|[@+id/lstDeviceOverview,regular,device_buildingZone]</code>
+
:; ⤷ <code>[gn:act_sortListView]|[@+id/lstDeviceOverview,regular,device_buildingZone]</code>
 
<hr>
 
<hr>

Latest revision as of 19:57, 12 July 2017

gn:act_sortListView

Description
Action used to sort GnListView data.
Action returns
void

Action signatures

Sort data

[gn:act_sortListView]|[target,sortOrder,sortColumn]
Parameter Description
target target where the data will be sorted
sortOrder represents sorting order

Can be

  • hardcoded
    • regular
    • reverse
sortColumn represents sorting column

Can be

  • hardcoded

Example

@+id/lstDeviceOverview - target
regular - sort order
device_buildingZone - column name
[gn:act_sortListView]|[@+id/lstDeviceOverview,regular,device_buildingZone]