Results 1 to 6 of 6

Thread: Searching a Manual Loaded Grid

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    2,165

    Default Searching a Manual Loaded Grid

    I am helping another developer move a windows app to a mobile webapp and have hit a snag.


    The user wants to automatically navigate from the order select to the order items.
    Now the Order select is a data aware grid and I overrode the onSearch as below to automatically navigate to the next view (order item list)
    Code:
    Procedure OnSearch String sSearchText
                Integer iCol
                Integer eType
                Handle hoCol
                Boolean bFound
                RowID riID
                String sRowID
                String sFoundNum
                
                // Get the target search column's id
                WebGet piSortColumn to iCol
            
                If (iCol >= 0) Begin
                    // get the search columns object handle
                    Get GetColumnObject iCol to hoCol
                    
                    // Get the column object's data type.
                    WebGet peDataType of hoCol to eType
            
                    // perform format conversion (e.g. dates or numbers)
                    Move (ConvertFromClient(eType, sSearchText)) to sSearchText
                    
                    // Perform the lookup
                    Send RequestColumnLookup of hoCol sSearchText
                    Get File_Field_Current_Value of order_DD File_Fieldorder.INVOICE_NO to sFoundNum
                    Move (sFoundNum=sSearchText) to bFound
                    If (bFound) Begin
                        Get CurrentRowId of order_DD to riID
                        Move (SerializeRowID(riID)) to sRowID
                        // ToDo:  WE NEED TO NAVIGATE HERE
                        Send OnRowClick sRowID
                        //Send NavigateForward 
    
    
                    End
                    Else Begin
                        Send ShowInfoBox 'Not Found. Try again'
                    End
                End
            End_Procedure



    Now the user wanted to be able to search for orderItem product codes to allow a picklist from actual stock.
    The indexes proved no good for this process to instead I went for a manual loaded grid.
    All worked until I discovered that onSearch is not sent after the search dialog closes.
    The search does find the correct item and jumps to the row but I cannot emulate the moved forward as is done in the data aware list

    Investigating the help I found this.
    I am insure of why this event is not sent when the list is not data aware.
    Can DAW throw some light on this please?

    [QUOTE]
    This is called by the client's JavaScript engine to perform a search on an automatic data-aware list (peDbGridType = gtAutomatic and pbDataAware = True).
    [/CODE]
    Last edited by Chris Spencer; 10-Feb-2019 at 07:21 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •