jQuery UI Widgets › Forums › Grid › autoresize column issue on ready
Tagged: autoresizecolumns, javascript grid, jquery grid, ready
This topic contains 4 replies, has 3 voices, and was last updated by ngirish 7 years, 6 months ago.
-
Author
-
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’);
});
`Hi ngirish,
Better use columnsautoresize property if you want autoresize in initialization.
Here is a demo.Best Regards,
Ivailo IvanovjQWidgets Team
http://www.jqwidgets.comThanks for the suggestion. It didn’t have any effect however. It seems there is something interfering with autoresize.
ngirish: try removing the “100%” width, that fixes a very similar issue that I have in my own code
thanks, but that can’t be a solutions since the width 100% is required.
-
AuthorPosts
You must be logged in to reply to this topic.