Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: Populating Dropdown in datatable

Expand Messages
  • Satyam
    You can either do each one sequentially, which would be straight forward but slow, or you can launch all three requests for dropdown data and then keep a count
    Message 1 of 3 , Aug 21, 2009
    • 0 Attachment
      You can either do each one sequentially, which would be straight forward
      but slow, or you can launch all three requests for dropdown data and
      then keep a count of how many successes you've had. Once the success
      count reaches three, then you have all your dropdowns and you then do
      the DataTable. You can launch several asyncRequests at once each with
      a different callback. Each callback will either have a different
      success function to populate the corresponding dropdown or you can have
      a single function and use the "argument" property of the callback to
      store some references to which dropdown is to be filled. The replies
      may come in any order, but asyncRequest will make sure each reply goes
      either to the right function or to the same function with the right
      argument.

      Satyam

      juliebonniedaisy escribió:
      > thanks for the detailed reply. So it seems that populating my dropdown would happen first and onSuccess I would create and render the datatable. So what if I had 3 unrelated dropdowns on the datatable. What order would you populate them and the datatable? Thanks again for the great info.
      >
      > John
      >
      > 1. declare the URL
      > 2. define the handleSuccess function which:
      > 1. Uses the JSON utility to decode the dropdownOptions from o.responseText
      > 2. declares the editors
      > 3. builds the column defs
      > 4. creates the DataSource
      > 5. creates the DataTable
      > 3. define the handleFailure
      > 4. define the callback
      > 5. call asyncRequest
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.392 / Virus Database: 270.13.63/2317 - Release Date: 08/21/09 06:04:00
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.