jQuery UI Widgets Forums Grid autoresize column issue on ready

This topic contains 4 replies, has 3 voices, and was last updated by  ngirish 8 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • autoresize column issue on ready #84651

    ngirish
    Participant

    autoresizecolumns not working properly on ready. it is resizing columns, buts not properly to fit all values. The autoresizecolumns i have on filter function is working perfectly as expected. I cant seem to figure out the issue with the same function on ready. my code is below. Any help is appreciated.

    `
    $(“#products-list”).jqxGrid({ theme:”canway”, width:”100%”, height:”100%”, source:dataproductsAdapter, showfilterrow:true, filterable: true, showfiltercolumnbackground: false, columns: [
    { text:”#”, dataField: “products_pkeyid”, filtertype:”textbox”, hidden: true },
    { text:”#”, dataField: “products_ladder_pkeyid”, filtertype:”textbox”, hidden: true },
    { text:”Item Description”, dataField: “products_description”, filtertype:”textbox” },
    { text:”Manufacturer Part No.”, dataField: “products_manufacturerPartNumber”, filtertype:”textbox” },
    { text:”MFG Part #”, dataField: “products_mfgPartNumber”, filtertype:”textbox” },
    { text:”Image Name”, dataField: “products_ladder_imageName”, filtertype:”textbox” },
    { text:”Width (Inches)”, dataField: “products_ladder_widthInches”, filtertype:”textbox” },
    { text:”Ladder Type”, dataField: “products_ladder_ladderType”, filtertype:”textbox” }
    ],
    ready: function()
    {
    $(“#products-list”).jqxGrid(‘autoresizecolumns’);
    }
    });

    $(‘#products-list’).on(‘filter’, function () {
    $(‘#products-list’).jqxGrid(‘autoresizecolumns’);
    });
    `

    autoresize column issue on ready #84659

    ivailo
    Participant

    Hi ngirish,

    Better use columnsautoresize property if you want autoresize in initialization.
    Here is a demo.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    autoresize column issue on ready #84670

    ngirish
    Participant

    Thanks for the suggestion. It didn’t have any effect however. It seems there is something interfering with autoresize.

    autoresize column issue on ready #84675

    tvenable.mie
    Participant

    ngirish: try removing the “100%” width, that fixes a very similar issue that I have in my own code

    autoresize column issue on ready #84704

    ngirish
    Participant

    thanks, but that can’t be a solutions since the width 100% is required.

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

You must be logged in to reply to this topic.