You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Grid - SelectionStyle Property
Specifies the rules for item selection within the list
Member of Grid (PRIM_GRID)
Data Type - Enumeration

Details


The SelectionStyle property determines how selection works within the list.

Allowed Values

Enum Value

Description

Extended

More than one row and more than one column can be selected

Multiple

More than one row can be selected. The whole item will show as selected

Single

Only one row can be selected. Only the left most column will show as selected

WholeRow

Only one row can be selected. The whole item will show as selected

Example


The example below shows how different selection style work.
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Height(325) Left(190) Top(223) Width(766) Clientwidth(750) Clientheight(286) Layoutmanager(#TableLayout1)
Define_Com Class(#PRIM_TBLO) Name(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout1) Height(1.77)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row2) Displayposition(2) Parent(#TableLayout1) Height(0.23)
Define_Com Class(#PRIM_TBLO.Item) Name(#ListViewItem1) Column(#Column1) Manage(#Grid) Parent(#TableLayout1) Row(#Row1)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem1) Alignment(TopLeft) Column(#Column1) Flow(Right) Manage(#Extended) Parent(#TableLayout1) Row(#Row2) Sizing(None) Margintop(4) Marginleft(4)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem2) Alignment(TopLeft) Column(#Column1) Flow(Right) Manage(#Multiple) Parent(#TableLayout1) Row(#Row2) Sizing(None) Margintop(4) Marginleft(4)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem3) Alignment(TopLeft) Column(#Column1) Flow(Right) Manage(#Single) Parent(#TableLayout1) Row(#Row2) Sizing(None) Margintop(4) Marginleft(4)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem4) Alignment(TopLeft) Column(#Column1) Flow(Right) Manage(#WholeRow) Parent(#TableLayout1) Row(#Row2) Sizing(None) Margintop(4) Marginleft(4)
Define_Com Class(#PRIM_GRID) Name(#Grid) Columnbuttonheight(29) Displayposition(1) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(0) Height(254) Width(750) Rowheight(27)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn1) Displayposition(1) Parent(#Grid) Source(#EMPNO)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn2) Displayposition(2) Parent(#Grid) Source(#SURNAME)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn3) Displayposition(3) Parent(#Grid) Source(#GIVENAME)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn4) Displayposition(4) Parent(#Grid) Source(#ADDRESS1)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn5) Displayposition(5) Parent(#Grid) Source(#ADDRESS2)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn6) Displayposition(6) Parent(#Grid) Source(#ADDRESS3)
Define_Com Class(#PRIM_RDBN) Name(#Extended) Caption('Extended') Displayposition(2) Left(4) Marginleft(2) Parent(#COM_OWNER) Tabposition(2) Top(258)
Define_Com Class(#PRIM_RDBN) Name(#Multiple) Caption('Multiple') Displayposition(3) Left(128) Marginleft(2) Parent(#COM_OWNER) Tabposition(3) Top(258)
Define_Com Class(#PRIM_RDBN) Name(#Single) Caption('Single') Displayposition(4) Left(252) Marginleft(2) Parent(#COM_OWNER) Tabposition(4) Top(258) Buttonchecked(True)
Define_Com Class(#PRIM_RDBN) Name(#WholeRow) Displayposition(5) Left(376) Marginleft(2) Parent(#COM_OWNER) Tabposition(5) Top(258) Caption('WholeRow')
Evtroutine Handling(#Com_Owner.CreateInstance)
Select Fields(#Grid) From_File(pslmst)
Add_Entry To_List(#Grid)
Endselect
Endroutine
Evtroutine Handling(#Extended.click #Multiple.click #Single.click #WholeRow.click) Com_Sender(#Sender)
#Grid.SelectionStyle := #Sender.Name
Endroutine
End_Com

See also

All Component Classes
Technical Reference

  • No labels