Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8461059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:46:30+00:00 2026-06-10T13:46:30+00:00

I need the first flexigrid to make the ajax call and load its data

  • 0

I need the first flexigrid to make the ajax call and load its data and when its done, the second flexigrid will make the next ajax call when it is it’s turn.
How can I do this?

//FILL THE OFFERS GRID
            jQuery("#OFFERS").flexigrid({
                url: 'index.php?option=com_virtuemart&view=offers&task=getOffers&page=1&format=raw',
                dataType: 'json',
                singleSelect:true,          
                colModel : [
                    {display: 'id', name : 'id', width : 100, sortable : true, align: 'center'},
                    {display: 'startdate', name : 'startdate', width : 180, sortable : true, align: 'center'},
                    {display: 'enddate', name : 'enddate', width : 180, sortable : true, align: 'left'},
                    {display: 'product_name', name : 'product_name', width : 120, sortable : true, align: 'left'},
                    {display: 'discount_amount €', name : 'discount_amount', width : 100, sortable : true, align: 'left'},
                    {display: 'discount_percent %', name : 'discount_percent', width : 120, sortable : true, align: 'right'}
                    ],
                searchitems : [
                    {display: 'startdate', name : 'startdate', isdefault: true},
                    {display: 'enddate', name : 'enddate'},
                    {display: 'product_name', name : 'product_name'},
                    {display: 'discount_amount', name : 'discount_amount'},
                    {display: 'discount_percent', name : 'discount_percent'}
                    ],
                sortname: "id",
                sortorder: "asc",
                usepager: true,
                title: 'Offer',
                useRp: true,
                rp: 15,
                showTableToggleBtn: true,
                width: 900,
                onSubmit: addFormData,      
                height: 200,
                buttons: [
                            {name: 'Test', onpress: test}
                    ]
            });


            //FILL THE PRODUCTS GRID

            jQuery("#pnlProducts").flexigrid({
                url: 'index.php?option=com_virtuemart&view=offers&task=getProducts&page=1&format=raw',
                dataType: 'json',
                singleSelect:true,          
                colModel : [
                    {display: 'id', name : 'id', width : 100, sortable : true, align: 'center'},
                    {display: 'name', name : 'name', width : 180, sortable : true, align: 'center'},
                    {display: 'price', name : 'price', width : 180, sortable : true, align: 'left'}                 
                    ],
                searchitems : [
                    {display: 'id', name : 'id', isdefault: true},
                    {display: 'name', name : 'name'},
                    {display: 'price', name : 'price'}                  
                    ],
                sortname: "id",
                sortorder: "asc",
                usepager: true,
                title: 'Products',
                useRp: true,
                rp: 15,
                showTableToggleBtn: true,
                width: 900,
                onSubmit: addFormData,
                height: 200,
                buttons: [{name: 'Test2', onpress: test}]
            });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:46:32+00:00Added an answer on June 10, 2026 at 1:46 pm

    Finally I found My answer, In order to ensure many flexigrids in my pages to work properly without making many async requests and cause the browser to mix data, I can set its property onSuccess and pass a function there.

    //FILL THE OFFERS GRID
                jQuery("#tblOFFERS").flexigrid({
                    url: 'index.php?option=com_virtuemart&view=offers&task=getOffers&page=1&format=raw',
                    dataType: 'json',
                    singleSelect:true,          
                    colModel : [
                        {display: 'id', name : 'id', width : 100, sortable : true, align: 'center'},
                        {display: 'startdate', name : 'startdate', width : 180, sortable : true, align: 'center'},
                        {display: 'enddate', name : 'enddate', width : 180, sortable : true, align: 'left'},
                        {display: 'product_name', name : 'product_name', width : 120, sortable : true, align: 'left'},
                        {display: 'discount_amount €', name : 'discount_amount', width : 100, sortable : true, align: 'left'},
                        {display: 'discount_percent %', name : 'discount_percent', width : 120, sortable : true, align: 'right'}
                        ],
                    searchitems : [
                        {display: 'startdate', name : 'startdate', isdefault: true},
                        {display: 'enddate', name : 'enddate'},
                        {display: 'product_name', name : 'product_name'},
                        {display: 'discount_amount', name : 'discount_amount'},
                        {display: 'discount_percent', name : 'discount_percent'}
                        ],
                    sortname: "id",
                    sortorder: "asc",
                    usepager: true,
                    title: 'Offer',
                    useRp: true,
                    rp: 15,
                    showTableToggleBtn: true,
                    width: 900,
                    onSubmit: addFormData,      
                    height: 200,
                    onSuccess : fillTheNextGrid 
                    buttons: [
                                {name: 'Test', onpress: test}
                        ]
                });
    
    
                //FILL THE PRODUCTS GRID
    function fillTheNextGrid(
                jQuery("#tblPRODUCTS").flexigrid({
                    url: 'index.php?option=com_virtuemart&view=offers&task=getProducts&page=1&format=raw',
                    dataType: 'json',
                    singleSelect:true,          
                    colModel : [
                        {display: 'id', name : 'id', width : 100, sortable : true, align: 'center'},
                        {display: 'name', name : 'name', width : 180, sortable : true, align: 'center'},
                        {display: 'price', name : 'price', width : 180, sortable : true, align: 'left'}                 
                        ],
                    searchitems : [
                        {display: 'id', name : 'id', isdefault: true},
                        {display: 'name', name : 'name'},
                        {display: 'price', name : 'price'}                  
                        ],
                    sortname: "id",
                    sortorder: "asc",
                    usepager: true,
                    title: 'Products',
                    useRp: true,
                    rp: 15,
                    showTableToggleBtn: true,
                    width: 900,
                    onSubmit: addFormData,
                    height: 200,
                    buttons: [{name: 'Test2', onpress: test}]
                });
    )
    

    the source http://code.google.com/p/flexigrid/wiki/FAQ

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let me show what I need first so you can understand my problem. I
ı need first monday future week ? how to make C#? now date 09.jan.2009
I have an 300 rows(data) each page contain 10 records I need first 10
I have a c# .net program where I need to first insert data into
I have a file location on my file system. I need to first load
I'm trying to load a file using webrequest method. First I need to log
Can anyone tell whether we can fix first two columns on FlexiGrid..? My requirement
I need change first image in Galleria fullscreen theme ( link ) after Galleria.run().
To find strongly connected components in a directed graph G you need to first
In my business logic, I first need to check if an Appengine Search API

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.