jQWidgets Forums

jQuery UI Widgets Forums Grid Chaning width of SubGrid?

This topic contains 5 replies, has 2 voices, and was last updated by  MatthewV 8 years, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Chaning width of SubGrid? #88025

    MatthewV
    Participant

    How can I make the sub-grid fill the entire of the parent grid width? Currently the sub-grid only take up about 80% of the parent grid.

    Chaning width of SubGrid? #88044

    ivailo
    Participant

    Hi MatthewV,

    Please, try to set the width of the nested grid on 100%.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    Chaning width of SubGrid? #88052

    MatthewV
    Participant

    When I do

            rowdetailstemplate:
            {
                rowdetails: '<div id="TimeOverviewSubGrid" style="margin: 10px;"></div>',
                rowdetailsheight: 100,
                rowdetailshidden: true,
                width: 100%
            },

    I get a syntax error on the closing curly bracket. What is the correct code for specifying the width?

    Chaning width of SubGrid? #88101

    MatthewV
    Participant

    I have also tried this with the number in quotes but that does not work. How am I supposed to get the sub-grid to completely fill the container? Please show the proper command, this is not documented anywhere I can find.

    Chaning width of SubGrid? #88160

    ivailo
    Participant

    Hi MatthewV,

    First, you have to set the width of the nested grid to 100%.
    In our nested grid example you have to change this part of code :

    
    ...
     if (grid != null) {
                        grid.jqxGrid({
                            source: nestedGridAdapter, width: '100%', height: 200,
                            columns: [
                              { text: 'Ship Name', datafield: 'ShipName', width: 200 },
                              { text: 'Ship Address', datafield: 'ShipAddress', width: 200 },
                              { text: 'Ship City', datafield: 'ShipCity', width: 150 },
                              { text: 'Ship Country', datafield: 'ShipCountry', width: 150 },
                              { text: 'Shipped Date', datafield: 'ShippedDate', width: 200 }
                           ]
                        });
    ...
    

    Then remove margin-left :
    rowdetailstemplate: { rowdetails: "<div id='grid' style='margin-left: 0px;'></div>", rowdetailsheight: 220, rowdetailshidden: true },

    Unfortunately, the space under the column with arrows will remain.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    Chaning width of SubGrid? #88164

    MatthewV
    Participant

    Thanks, this is working now.

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

You must be logged in to reply to this topic.