Lianja showPickList() Method Examples

From Lianjapedia
Jump to: navigation, search

JavaScript example

Lianja.showPickList(
    "Select an Order",                         /* title */
    function(rowdata)                          /* onok */
    {
        // rowdata is an object with members for all columns in the active grid record 
        console.log(rowdata);
    },
    function()                                 /* oncancel */
    {
    },
    600,                                       /* width */
    600,                                       /* height */
    "southwind",                               /* database */
    "orders",                                  /* table */
    "",                                        /* filter */
    [                                          /* columns to display */
        {caption: 'CustomerID', controlsource: 'customerid', type: 'C', width: 100},
        {caption: 'OrderID', controlsource: 'orderid', type: 'C', width: 100},
        {caption: 'Order Date', controlsource: 'orderdate', type: 'D', width: 100},
        {caption: 'Required Date', controlsource: 'requireddate', type: 'D', width: 100},
        {caption: 'Shipped Date', controlsource: 'shippeddate', type: 'D', width: 100}
    ]
);

LianjaScript example

jsonresult = Lianja.showPickList( ;
    "Select an Order",  ;               
    600,  ;                              
    600,  ;                                
    "southwind",  ;                    
    "orders", ;                           
    "", ;                               
    "caption:controlsource:type:width,..."  ;
)
 
if len(jsonresult) > 0
    result = json_decode( jsonresult )
endif