jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Vertical Scrollbar in NestedGrid
Tagged: grid, javascript grid, jquery datagrid, jquery grid
This topic contains 9 replies, has 3 voices, and was last updated by Mr.Moo 9 years, 6 months ago.
-
Author
-
I made a nested grid with an ajax call to fill the grid.
Everything is ok but the vertical scroll bar is not visible.Main Grid
$(“#div_planilha_003_datagrid”).jqxGrid({
width: 798,
height: 400,
source: dataAdapter,
rowsheight: 21,
altrows: true,
rowdetails: true,
initrowdetails: initrowdetails,
rowdetailstemplate: { rowdetails: “<div id=’grid_003_detalhes’ style=’margin: 3px;overflow: auto;’></div>”, rowdetailsheight: 100, rowdetailshidden: true },
columnsresize: true,
selectionmode: ‘singlerow’,
enablehover: true,
columns: [
{ text: ‘Hora’, datafield: ‘ida_h_saida’, cellsrenderer: rend_cell, width: 60 },
{ text: ‘Rota’, datafield: ‘rota’, cellsrenderer: rend_cell, width: 300 },
{ text: ‘Pax’, datafield: ‘r_pax_cli’, cellsrenderer: rend_cell, width: 55 },
{ text: ‘Vagas’, datafield: ‘r_vagas’, cellsrenderer: rend_cell, width: 55 },
{ text: ‘Local de saída’, datafield: ‘ida_local_saida’, cellsrenderer: rend_cell, width: 300 }]
})
Sub Grid
var detalhesAdapter = new $.jqx.dataAdapter(source);
if (grid != null) {
grid.jqxGrid({
source: detalhesAdapter,
width: ‘100%’,
height: ‘100%’,
rowsheight: 21,
columns: [
{ text: ‘Nome’, datafield: ‘id_passageiros’, width: 200 },
{ text: ‘Pax’, datafield: ‘pax’, width: 100 }
]
});
}Is there any property to set the scrollbars ?
In the main grid they are shown if the grid is bigger than the container.thanks
Hi pedro_prt,
May be your Nested Grid’s Width is higher than your Grid’s width and that’s the issue here. Set less width to your nested grid.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi
My main grid is 798 width and the sub-grid is 250.
I tried all possible scenarios. Different column widths, autoheight on/off, different sub-grid widths, etc.
In all situations, if the sub-gris is heigher than the rowdetailsheight on the main-grid it’s impossible to see the hidden rows. If I try to scroll down the sub-grid width the keyboard, also doesn’t scroll.Hope you have a workaround because this grid is almost exactly what I need.
I’m trying this grid width the 30-day fully functional evaluation version of jQWidgets (jQWidgets v3.8.0 (2015-Apr)). I don’t know if in others versions this situation works.
Tks
Pedro Oliveira
Hi Pedro,
“if the sub-gris is heigher than the rowdetailsheight on the main-grid it’s impossible to see the hidden rows” – of course No. It should be with less height than the rowdetailsheight.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Works Great
I didn’t set the height of the sub grid or in other situation I set it to 100%.
Now I set the sub grid height to 145 and the rowdetailsheight to 150 and it works perfectly.Thanks for your help
I have a similar situation but I simply cannot get the scroll bars to display. I have set my rowdetailsheight: 150 in the rowdetailstemplate and set the height of the sub-grid to 140. What am I missing?
grid.jqxGrid({ altrows: true, source: detailsAdapter, width: 850, autoheight: true, height: 140, columns: […]}) ;
and
rowdetailstemplate: { rowdetails: “<div id=’grid’ style=’margin: 0px;’></div>”, rowdetailsheight: 150, rowdetailshidden: true } …
So any help would be appreciated.
Hi Mr.Moo,
When autoheight is set to true, scrollbars should not be displayed.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Thanks Peter,
I have removed this attribute in both my table definitions but for me, no effect!
So if you have any further thoughts…
—
MooMaybe if I had of been paying attention I would have realised that I needed to adjust the width of the nested grid and it wouldn’t have needed to have been pointed out to me!
So thanks again to everyone for the answer.
—
Moo -
AuthorPosts
You must be logged in to reply to this topic.