Form VL_SAM035: Sorting Grid Columns

LANSA

Form VL_SAM035: Sorting Grid Columns
Name: VL_SAM035

Description: The following RDMLX form demonstrates methods for sorting grid columns.
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM BORDERICONS(Maximize+Minimize+SystemMenu) FORMPOSITION(ScreenCenter) HEIGHT(359) WIDTH(499);
DEFINE_COM CLASS(#PRIM_GRID) NAME(#GRID_1) DISPLAYPOSITION(1) HEIGHT(329) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(1) TOP(2) WIDTH(491);
DEFINE_COM CLASS(#PRIM_GDCL) NAME(#COL1) CAPTION(Number) CAPTIONTYPE(Caption) DISPLAYPOSITION(1) PARENT(#GRID_1) SORTONCLICK(True) SOURCE(#EMPNO) WIDTH(15);
DEFINE_COM CLASS(#PRIM_GDCL) NAME(#COL2) CAPTION('Last Name') CAPTIONTYPE(Caption) DISPLAYPOSITION(2) PARENT(#GRID_1) SORTONCLICK(True) SOURCE(#SURNAME) WIDTH(30);
DEFINE_COM CLASS(#PRIM_GDCL) NAME(#COL3) CAPTION('First Name') CAPTIONTYPE(Caption) DISPLAYPOSITION(3) PARENT(#GRID_1) SORTONCLICK(True) SOURCE(#GIVENAME) WIDTH(30);
DEFINE_COM CLASS(#PRIM_GDCL) NAME(#COL4) CAPTION(Zip) CAPTIONTYPE(Caption) DISPLAYPOSITION(4) PARENT(#GRID_1) SORTONCLICK(True) SOURCE(#POSTCODE) WIDTH(10);
DEFINE_COM CLASS(#PRIM_GDCL) NAME(#COL5) CAPTION(Salary) CAPTIONTYPE(Caption) DISPLAYPOSITION(5) PARENT(#GRID_1) SORTONCLICK(True) SOURCE(#SALARY) WIDTH(20) WIDTHTYPE(Remainder);
* ;
* Form Initialization;
* ;
EVTROUTINE handling(#com_owner.Initialize);
SET #com_owner caption(*component_desc);
select (#empno #surname #givename #postcode #salary) pslmst;
add_entry #grid_1;
endselect ;
ENDROUTINE ;
;
END_COM ;