Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Is it possible to add multiple igGrids to single page in MVC Asp.net?
posted

Hello -

I need to have multiple grids to a single asp.net MVC page?  To add even more complexity the number of grids is variable also.  I might be able to accomplish it with a hierarchical grid but thought I would explore this first.  Thanks much

Top Replies

Parents
  • 1320
    Offline posted

    Hello Andrew,

    After investigating this further, I determined that multiple grids could be defined in one page. Number of grids based on a variable could be rendered by defining the grids in a loop. I have prepared a sample, demonstrating the described behavior. The defined grids contain only basic options, however there is no problem in defining other options as well:

    $(function () {

                for (var i = 1; i < numberGrids + 1; i++) {

                    var grid = "grid" + i;

     

                    $("#" + grid).igGrid({

                        autoGenerateColumns: true,

                        width: "500px",

                        dataSource: products[i - 1]

                    });

                }

            });

    Below I am attaching the sample. Please test it on your side and let me know if you need any further information regarding this matter.

    Regards,

    Monika Kirkova,

    Infragistics

    MultipleIgGrids.zip

Reply Children