PDA

View Full Version : How can I detect if the scroll bar of an Ext.grid.EditorGridPanel appears?



Lailolai
7 Mar 2012, 8:57 AM
Hi,

I have an Ext.grid.EditorGridPanel that can be vertical scrollable, but if the data in the grid fits in the view height, the vertical scroll bar will not appear. How can I know certainly if that vertical scroll bar is shown? I want to put a disable mask on the panel, but I don't want the mask to disable the scroll bar if it appears or leave a right column enabled if it doesn't.

Thanks in advance,
Fernando G.

mitchellsimoens
7 Mar 2012, 10:04 AM
Check the difference between the heights of the rows and the body.

Lailolai
8 Mar 2012, 1:26 AM
Hi, first of all, thank you for answering so fast.

I considered that approach too at first but since the Ext.grid.EditorGridPanel has in the "view" config option an Ext.grid.GroupingView (sorry I forgot to mention it), the calculations are not that simple. I could of course make a calculation knowing how many rows are there and how they are groupped. I was just asking if there was an easier way to do this. Is there any?

Thanks in advance
Fernando G.