jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Columns not taking full width and scrollbar missing
Tagged: angular grid, auto resize columns, autoresizecolumns, column, grid, jquery grid, jqxgrid, span, width
This topic contains 5 replies, has 2 voices, and was last updated by Dimitar 9 years, 8 months ago.
-
Author
-
Hi,
I am testing the latest version of the grid – v3.8.1 using the commercial download.
I’ve been following your autoresizecolumns examples and some of the others like fluid. I don’t know why but I have two issues:
1. I don’t see the scrollbar in my grid by default like in your examples. I don’t see your examples specifically setting anything for the scrollbar to appear. I do have the jqxscrollbar.js included
2. The grid has 3 columns. I can not get them to span the width of the grid. I set the width of the grid to (850 and or 100%) and that works. But no matter what I set the width of the columns to like in your examples (auto or % or 50), the columns always are just the width of the largest item in it’s own that column and they will not span the width of the grid.
I would be grateful for any suggestions to resolve this…
Hi MrWinky,
- Please make sure you have also included jqxbuttons.js, which, too, is necessary for the scrollbar to appear.
- This is the result of the method autoresizecolumns. If you do not call it, the width of each column will be as specified by its width property. The various demos show this behaviour.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Thanks Ditmar.
1. Per my message – I did try autoresizecolumn per the demos and it didn’t work. That was my point.
I’ve been following your autoresizecolumns examples and some of the others like fluid
2. I am loading JQButtons. Here is the debug screen from Visual Studio listing what has been loaded
“https://www.dropbox.com/s/9n5q530cwa9l41f/LoadedJS%20files.png?dl=0″ title=”https://www.dropbox.com/s/9n5q530cwa9l41f/LoadedJS%20files.png?dl=0”
Ditmar,
As a matter of fact, I just stepped through the logic of $(“#jqxgrid”).jqxGrid(‘autoresizecolumns’)
And what I see is the code just makes the column as wide as the widest item in the column its searching. So that if all the columns together added up to 500 wide – but the grid was sized to 800, there will be a blank space between the last column and end of the grid thats 300 wide. I am looking for the grid to “stretch” itself to the width of the whole column.
Ok… found the bug. The first time the grid is shown – the columns are not autosized correctly as described in my last post. If I click the pager – or scroll past the first page then the columns automatically resize correctly.
I have the following
ready: function()
{
$(“#myGrid”).jqxGrid(‘autoresizecolumns’);
}But that doesn’t fix it.
Hi MrWinky,
Could you, please, provide us with a JSFiddle/JS Editor example demonstrating the issue? What you are describing in your post:
And what I see is the code just makes the column as wide as the widest item in the column its searching. So that if all the columns together added up to 500 wide – but the grid was sized to 800, there will be a blank space between the last column and end of the grid thats 300 wide. I am looking for the grid to “stretch” itself to the width of the whole column.
is normal for this functionality.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.