PDA

View Full Version : all grid features in one grid.



chavanpriya
16 Jul 2009, 3:36 PM
ExtJS has various grids available with different features,one grid is editable another grid supports pagination, another grid supports components like drop downs.Is it possible to have/create 1 grid with all these features?

mjlecomte
16 Jul 2009, 3:58 PM
Yes.

chavanpriya
16 Jul 2009, 8:37 PM
Can you please throw some light on how to do it?

danh2000
16 Jul 2009, 9:00 PM
Can you please throw some light on how to do it?

http://extjs.com/deploy/dev/examples/samples.html#sample-2
http://extjs.com/deploy/dev/docs/
http://extjs.com/learn/Tutorials#Grids

mjlecomte
17 Jul 2009, 3:04 AM
Many people think of Ext as a set of legos. You can combine the legos in any way you want to build the castle you desire. So the thing to recognize is that each feature / trait you want can simply be added. So you start with a vanilla grid and add to it. Some of the examples try to show adding a particular feature so you can more easily see what each feature does. Sometimes an example will show the combination of several features.


editable - an Ext.grid.GridPanel is not editable, simply use an Ext.grid.EditorGridPanel (http://extjs.com/deploy/ext-3.0.0/docs/?class=Ext.grid.EditorGridPanel) to enable editing capabilities
pagination - you'll specify a tbar or bbar (top or bottom bar) and you'll specify that bar be an Ext.PagingToolbar (http://extjs.com/deploy/ext-3.0.0/docs/?class=Ext.PagingToolbar)instead of a vanilla Ext.Toolbar
drop downs - you'll specify an editor for that column (http://extjs.com/deploy/ext-3.0.0/docs/?class=Ext.grid.Column&member=editor), that editor will be an Ext.form.ComboBox


The example in my signature shows most of these features and more.