PDA

View Full Version : How to hide a column in a gridpanel?



igor2000
13 Aug 2010, 5:50 AM
Is that possible to hide a column in a array gridpanel when I do a

"store.loadData(array);"

????

and is there a possibility to hide the horizontal scroll bar of a grid panel?


I mean, do you know when you have too many columns it gets a scrool bar to get the user until the end
of the gridpanel right? Let's say I want a simple way to block the last column (hiding the scroll bar).

thx again

Animal
13 Aug 2010, 5:58 AM
http://dev.sencha.com/deploy/dev/docs/?class=Ext.grid.ColumnModel&member=setHidden

You may be interested in

http://dev.sencha.com/deploy/dev/docs/?class=Ext.grid.GridView&member=forceFit

igor2000
13 Aug 2010, 6:03 AM
forceFit Will make all columns fit the div right?

I want something like:

___________________________________________
| 1 ...............| 2.................................. |..... 3 |
|------------------------------------------------|
|......(data).....|..........(data)..................|....(da|
|......(data).....|..........(data)..................|....(da|
|......(data).....|..........(data)..................|....(da|
|_________________________________________ |
|............... <- this is a scroll bar -> ..................|
|__________________________________________|
column number 3 partially appears because the div is too small right?

I want column 3 partially appearing AND no horizontal scroll bar
so the user get acess the rest of the columns after number 3

Animal
13 Aug 2010, 6:15 AM
Size your grid!

igor2000
13 Aug 2010, 6:19 AM
size it for what?

lets say column 1, 2 and 3 have 100px each

if I size it to less than 300px the scroll bar will apear right?

I WANT to size it less than 300px so column 3 will get CUT
but i DONT want the scroll bar.

is there a way?

Animal
13 Aug 2010, 6:25 AM
You want it to overflow, but with no way of seeing the data that overflowed and is off the screen???????????

igor2000
13 Aug 2010, 6:26 AM
exactly!

Animal
13 Aug 2010, 6:28 AM
Set the overflow style of the GridView's scroller.

It's just HTML! You determine how overflow is to be treated with your own CSS.

igor2000
13 Aug 2010, 6:32 AM
right! thx