From wiki.ginstr.com
Jump to: navigation, search
(XML Attributes Description)
(XML Attributes Description)
 
(One intermediate revision by the same user not shown)
Line 38: Line 38:
 
|-
 
|-
 
| title="Attribute" | <code>gn:rowXmlDefinitionOdd</code>(M103.8.0.5)
 
| title="Attribute" | <code>gn:rowXmlDefinitionOdd</code>(M103.8.0.5)
| title="Description" | customised XML row layout for odd rows. If not defined, gn:custom_row_xml will be used instead.
+
| title="Description" | customised XML row layout for odd rows. If not defined, gn:rowXmlDefinition will be used instead.
  
 
Can be
 
Can be
 
* hardcoded - the name of xml file
 
* hardcoded - the name of xml file
 
|-
 
|-
| title="Attribute" | <code>gn:gn:rowXmlDefinitionEven</code>(M103.8.0.5)
+
| title="Attribute" | <code>gn:rowXmlDefinitionEven</code>(M103.8.0.5)
| title="Description" | customised XML row layout for even rows. If not defined, gn:custom_row_xml will be used instead
+
| title="Description" | customised XML row layout for even rows. If not defined, gn:rowXmlDefinition will be used instead
  
 
Can be
 
Can be

Latest revision as of 16:06, 18 September 2020

GnTableView

Widget XML tag
<com.ginstr.widgets.GnTableView>
Description
GnTableView is used to show data in an expanded table appearance, it replaces GnListView with gn:lstExpandToFitChildren="true"

XML Attributes Description

gn:data_filters{n} Defines filter parameter to sort data

Once data is loaded into GnTableView, it can be filtered by defining filter parameter.

Filters are separated by , (comma symbol) and they have special syntax. More about filters here.

gn:sortColumn Defines column by which data will be sorted

For example if dbRequest has columns: name,surname,timestamp, and name is set as a value for this attribute then all rows will be sorted by name and by defined sort order.

gn:sortOrder represents sorting order

Can be

  • hardcoded
    • regular - default
    • reverse
gn:rowXmlDefinition customised XML row layout

Can be

  • hardcoded - the name of xml file
gn:rowXmlDefinitionOdd(M103.8.0.5) customised XML row layout for odd rows. If not defined, gn:rowXmlDefinition will be used instead.

Can be

  • hardcoded - the name of xml file
gn:rowXmlDefinitionEven(M103.8.0.5) customised XML row layout for even rows. If not defined, gn:rowXmlDefinition will be used instead

Can be

  • hardcoded - the name of xml file

Events

gn:act_setClick
gn:act_setLongClick
gn:event_onRowCreated

Data types

Input
rows
Output
rows

Example

<com.ginstr.widgets.GnTableView
  android:id="@+id/lstSite"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_gravity="center_horizontal"
  android:layout_marginLeft="20dp"
  android:layout_marginRight="20dp"
  android:background="#555555"
  gn:rowXmlDefinition="attendeeList_row.xml"
  gn:data_columns_sort="surname"
  gn:data_filters="[#today]|[=]|[timestamp]" />

Filtering

Same as GnListView Filtering