jQuery UI Widgets Forums Grid Multiple Grids?

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 9 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Multiple Grids? #67318

    jlb2569
    Participant

    Hi There,
    is it possible to create multiple grids without knowing the number of these beforehand?

    Regards,
    José.-

    Multiple Grids? #67338

    Dimitar
    Participant

    Hi José,

    Generally, it is possible to do this. Probably you would have to iterate through a loop, in which to append the grid divs and initialize the grids dynamically. However, this all depends on your scenario and I cannot say for sure.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Multiple Grids? #67375

    jlb2569
    Participant

    Hi Dimitar, thanks for replying.
    I’m sorry, the description of my escenary was really poor.
    Working with mvc5, I have a bill that have ‘n’ payments.
    For each payment should be a grid that will contain the payment details. I don’t know how many payments will be there.
    So having a list of the payment’s Ids in my @Model I should go and look for the detail of 1 payment and then create a grid with its details.
    I know I can do something like this to create a div:

    var myDiv = document.createElement('div');
    

    myDiv.id = ‘jqxgrid’;
    `document.getElementsByTagName(‘body’)[0].appendChild(myDiv);

    but my confussion starts when I need to get the data for each grid. I’m stuck in there 🙁

    Multiple Grids? #67396

    Dimitar
    Participant

    Hi jlb2569,

    You can load your data with jqxDataAdapter. When it is loaded, you will have access to the number of payments and all other details, which you can then use to populate the grids.

    If the payments increase over time, you can easily update the loaded data through jqxDataAdapter with its dataBind method.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.