jQuery UI Widgets › Forums › Grid › autoresizecolumns in a Boostrap Layout
Tagged: jquery grid widget, jqwidgets grid
This topic contains 9 replies, has 4 voices, and was last updated by admin 8 years, 11 months ago.
-
Author
-
Hi, im testing your wigets and specially your Grid in my project that is developping with a bootstrap 3 layout.
I execute method autoresizecolumns when bind is completed.
It seems it works fine but when size change, it doesnt work fine.
For example:
View when page is loaded:
Its ok
Layout got a button for toggle sidebar, so when you click left sidwbar disappear and area where grid stay is bigger.
And then is like it shows after click in toogle button:In the same way if you resize browser, it looses horizontal scroll and all columns height fit to new grid size.
What can i do for setting that autoresizecolumns is executed when div’s size of grid has changed.
Thanks in advanceHi marianux,
“autoresizecolumns” resizes the Grid’s columns so the cells text would be visible. The method is not related to the Grid’s Width.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks for your fast answer.
Ok, i understand.
My grid is setted with width= “99%”
What can i do for keeping that size when browser or div container resizes?Thanks in advance
Hi marianux,
You can set the width of your columns in percentages, too.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comIve try it in combination with autoresizecolumns it seems work when the browser resizes
But when toogle left sidebar it doenst work.
Problem is not size of columns, problem is grid size, it keeps the size so doesn get bigger (in this case width should be bigger)
Any idea, suggestion?Thanks in advance.
Hi marianux,
It seems that the left sidebar does not trigger any ‘resize’ events. If it does, the Grid would be resized automatically. To refresh The Grid, use the “refresh” method. Another approach is for Splitter to use jqxSplitter. It has integration demo with jqxGrid available in the Splitter’s demos.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Thanks for the advice.
I have seen that when sidebar panel is collapsed, grid’s div is resized in a right way but columns area keep the original size, so it leaves an white area in the right side of the grid (you can see in the second image of my first post).I have added a button that trigger autoresizecolumns method in grid and it makes it right.
So i think i have to add this method in click event of toogle sidebar button.
Anyway ¿is there any event for grid resizing?Thanks in advance.
Well, it works when in click event of toogle sidebar button i have added
// JqxGrid resize if ($('#jqxgrid').length) { $("#jqxgrid").jqxGrid('autoresizecolumns'); }
Thanks for your support
Hi,
My problem is similar. Both of widgets (jqxTree, jqxGrid) are remained (rightside white part of screen) when I click AdminLTE2 bootstrap theme left sidebar toggle button. On grid I tried to set columns width with percent, but it doesn’t work. I tried to trigger window resize event by manual, but it doesn’t work neither. What direction should try?
Thanks in advance,
GaborHi Gabor,
Look at the samples online to learn how to use this Grid. We even have Bootstrap demo with the Grid.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.