2
votes

Hi in my java project we have extjs grid. while i increase data in grid pannel automatically vertical scrollbar will come.if the data is small amount the scrollbar will not appear. but the space of scrollbar is appeared in my grid. What i need is while data amount is small it shouldnot show scroll bar and scrollbar space, and when i incease the data it should allow the scrollbar to appaear. How can i achive it.

Thanks,

2

2 Answers

1
votes

May be this will help you

new Ext.grid.GridPanel({
  ...
  view : new Ext.grid.GridView({
                forceFit    : true,
                scrollOffset: 0,
                getTotalWidth: function() {
                    return "auto";
                }
  })
  ...
}
0
votes

You might need to override the css stylesheet. Probably

.x-list-body {
  overflow-y: hidden;
}

but it might be another one of the styles.