Show/Hide dojo grid columns - dojo

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

Related

Hide columns kipping data

My problem is the next:
I have a table in which I store information, by clicking on a row there will be a window in which I show that information in a certain format.
The problem I have when I try to make the table responsive because when trying to see it on small devices I have to do side scroll. I tried to hide columns with "display: hidden" but the data I can not retrieve, beacuse it not exists.
How can i do this?
Do yourself a favor - do not reinvent the wheel and use a specialized library, for example Datatables. At the very least, take a look at how datatables makes the table responsive.
You have not mentioned it, so I assume you are ok using jQuery, Bootstrap 3 or 4, Semantic UI or Foundation. For React / Angular there maybe other options.

change cell styling in KendoGrid

Just discovered the KendoGrid and was trying to change the style of an individual column(cell) after changing another cellvalue. For example I have a grid with a shipname and shipcity column. Suppose I have a business rule that says :
'Make shipcity cell value disabled when the shipname on the same row has the same value'
I found this sample which uses the blur event which I probably use, what would be a good way of implementing this rule?
Also nice to know your opinion in relation to asp.net mvc integration.
jsfiddle link:http://jsfiddle.net/dingen2010/begjT/1/
Updated the link:
You can try the updated fiddle example here
Basically conditional editor templates are not supported out of the box. You have two options.
Either use the edit event of the Grid find the editor inside e.containder and disable it the way it needs to be (if using Kendo widget use the enable(false) method, or add the readonly attribute if regular input).
The other options is to define custom editor like demonstrated in this JsBin example.

show tree inside the grid columns in extjs 4

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.

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.