jQuery UI Widgets › Forums › Grid › jqxGrid columns auto width calculation bug?
This topic contains 1 reply, has 2 voices, and was last updated by Peter Stoev 10 years, 6 months ago.
-
Author
-
Hello.
The problem is the wrong size calculation of the last column of the grid when used minwidth instead of a fixed width.
This simple example illustrates the problem:<!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" href="./jqw/jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="./jqw/scripts/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxdata.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxscrollbar.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxmenu.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxcheckbox.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxlistbox.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxdropdownlist.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxgrid.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxgrid.sort.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxgrid.pager.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxgrid.selection.js"></script> <script type="text/javascript" src="./jqw/jqwidgets/jqxgrid.edit.js"></script> <script type="text/javascript"> $(document).ready(function () { var columns = [ { text : 'Text 12345', minwidth: 300, dataField : 'f1', }, { text : 'Text 9876', minwidth: 300, dataField : 'f2', }]; // initialize jqxGrid $("#jqxgrid").jqxGrid( { width: 1200, columns: columns }); }); </script> </head> <body class='default'> <div id='jqxWidget'> <div id="jqxgrid"> </div> </div> </body> </html>
If i change text from ‘Text 12345’ to ‘Text 123456’ then the problem does not occur.
The attached image shows that the error in the calculation of the size == 1pxHi adron,
Ok, thank you for the feedback. If you prefer to turn off this behavior, you can simply set the columns width to a value of your choice.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.