Alpha DevCon 2018
Results 1 to 2 of 2

Thread: Passing variable from Ajax Callback to Grid

  1. #1
    Member
    Real Name
    Roger Scott
    Join Date
    May 2012
    Posts
    102

    Default Passing variable from Ajax Callback to Grid

    I have a Web Dialog page with a button that opens a Grid. I am trying to pass a value from the dialog to the grid to use as a filter. Using the Ajax Callback function I am able to obtain the field value I need which I put in a field on the dialog called textarea1. This I do by passing it on in a JS command like so:

    function parentLookup as c (e as p)
    dim j as p
    j.textarea1 = name (name is a variable that contains a value, textarea1 is a field on the dialog)
    dim jsTxt as c
    jsTxt = varToJSON(j)
    js = "{dialog.object}.populate(" + jsTxt + "); {dialog.object}.prepare();"
    parentLookup = js
    end function

    The next step is to open the Grid which has a base filter:

    family_name = "{textarea1}"

    The data does get put into the textarea1 field but after the grid has opened so I am therefore not filtering my grid correctly.
    Maybe there is a better solution to this, unfortunately after hours of googling I have not found it.

    Any help would be appreciated.
    Thanks

  2. #2
    Member
    Real Name
    Roger Scott
    Join Date
    May 2012
    Posts
    102

    Default Re: Passing variable from Ajax Callback to Grid

    Now I know why there have been no answers to my thread, the solution was obvious and I missed it.
    Simply set the 'Run actions synchronously' for the Ajax Callback and it works.

Similar Threads

  1. ajax callback passing data problem
    By JohnZaleski in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 05-03-2016, 07:28 PM
  2. Passing Arguments to an AJAX Callback?
    By mvaughn in forum Application Server Version 11 - Web/Browser Applications
    Replies: 6
    Last Post: 07-03-2014, 03:20 PM
  3. Solution for passing variables between client and server in ajax callback!
    By nlights in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 01-28-2012, 04:53 PM
  4. Passing contents of <form> input to Ajax callback
    By Antony in forum Application Server Version 10 - Web/Browser Applications
    Replies: 8
    Last Post: 11-01-2011, 05:36 PM
  5. How to get an AJAX callback variable to child grid intial value field
    By timposey in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 08-30-2010, 11:54 AM

Bookmarks

Posting Permissions

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