show tree inside the grid columns in extjs 4 - extjs4

I have to create a cube structure and for this I want to load a different tree panels under each of the columns of extjs grid panel.Is it possible to have the grid panel to show the tree panel under each of its columns.

You can refer TreeGrid component for this. I hope you are looking for this implementation. You can refer sencha kitchen sink link with example. Please refer below URL which may help you.
http://docs.sencha.com/extjs/4.2.0/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#tree-grid
Thanks.

So you need to use this TreeGrid for your project.
TreeGrid

No. Grid panel does not support this.
What's more, it does not make much sense from a functionality point of view - trees have nodes that can be expanded and collapsed. The only way this can work with a grid is if there is only one tree column; only then you can collapse or expand specific rows. But how would this work if there are different trees in different columns.
I'd take on rixo's recommendation and use a column layout in which there are trees. Although I still can't really see how users would benefit from such a screen.

Related

Show/Hide dojo grid columns

I have a screen where I have a matrix to display. I am using dgrid for it.
It has functionality to show/hide columns on the fly. User can show or hide any perticular column he wants. Also there is functionality of collapsible rows for which I have used TreeGrid of dgrid.
Please let me know if there is any way to implement this functionality.
You can check the screenshot below to understand my query.
![enter image description here][1]
dGrid to be implemented which show hide column functionality
I think what you want is the ColumnHider extension, already included in the dgrid repository
inside de externsions folder.
also your mesage is kinda cryptic, so its dificult to answer

How to specify column width in tree view

I'm using OpenERP 6.0.4 GTK client and the product tree view comes up with the UoM column too wide (wider than the product name).
Where is the place to control the column width in a tree view ?
Techically this whole is game of CSS but if you really courious and wanna check, How stuff going on then on OpenERP Web Project under addons/web/static/src/css/base.css check for the class oe_list_content you see width are 100% at rlative postion but each field type has their own attrib too. If you check stuff with Firebug you will each cell has mutiple CSS but oe_list_content in common, so all re kept in same tr, td at rleative position.
Thank You.
I guess you can't. The closest thing would be to use the colspan="x" field attribute, but unfortunately that doesn't work in tree views.

What is the difference between TreeGrid and TreePanel components of ExtJs 4?

I would like to know whats the difference between TreeGrid and TreePanel components of ExtJS 4?
I was looking for some component which will allow me to display rows and sub rows (for slice and dice kind of dashboard) but couldn't find anything similar in ExtJS 4.
I came across TreeGrid and TreePanel but not sure which one is latest and which to be used?
Please enlighten !
You want to use Treepanel. I believe treegrid name is a legacy cary over. Here is a very nice clean example of such a beast: http://docs.sencha.com/ext-js/4-0/#!/example/tree/treegrid.html
Notice how they did not rename the example :)

How do I customize the Ext.grid.RowBodyFeature of ExtJS 4.0?

I have implemented the getAdditionalData in ExtJS's grid.panel.
I have it showing the extra information but I want to style the extra row. Basically make the font smaller, etc.
Other than wrapping my data in span tags, is there another way to alter the style for those rows?
Thanks.
I found the answer. It was just easier to use a custom renderer.

Dojo Grid Template

In asp.net the DataGrid supports templates. You can provide your own template and have the grid fill the data in your template.
With Dojo Grid, it seems like I can't make my own template outside of the the rigid simplistic cell style grid that Dojo provides.
Does anyone know a way to use a custom template with Dojo Grid? Specifically, with Dojo you're forced to use a cell that corresponds to a data item. I'm looking to use a table as a template with any styling that I choose (rows,columns,rowspans,colspans, more than one data items in a single cell, etc).
Any clues please?
Thanks
Firstly, it sounds like everything you want is available by customizing the grid. You can do nesting of cells and even have things like Filtering Selects in rows. Unfortunately the docs on this are not awesome so it takes Googling and trial and error if you want very customized features.
Secondly, because of the OO nature of Dojo you can always use inheritance to create mixes of various widgets. Specifically the _templated class allows you to specify an HTML template for your widget, which themselves can included templated widgets.
If that sounds non-trivial, you're right, which is why I would suggest digging deeper into the Enhanced grid and probably open up the code before trying to write something yourself.
I can tell you that I struggled getting it working correctly, but I have hence been pleasantly surprised by features that I needed that I thought I would need to build myself but were built into the grid.