PDA

View Full Version : grid questions



Entropy
5 Aug 2016, 7:10 AM
My analysis team is asking for a few mods to our standard grid usage. Maybe i should break this into separate questions, but I suspect this is all old hat for those who use extjs more heavily than we do.

1) We use grid filters, and our client would like a 'select all' and 'clear all' option. Ideally, they would like it in the same menuspace as the filter options themselves, perhaps at the top, perhaps separated by a menu line. I have no idea how that would happen. I obviously don't want them in the store I populate the menu from, right? Is this even possible?

2) Failing #1, how would I add just regular menu options to the column? So perhaps just below the filters menu option would be a Clear Filters and Select All Filters?

3) One of the annoying things about the grid is the lack of selectability. It's often useful to highlight and copy a cell to your clipboard. But the grid, which has row highlight and all that, doesn't seem to offer that. Is there a way to enable that? I don't want or need an editable grid, but the ability to select text and copy it would be useful.

alex.volfson
26 Aug 2016, 6:29 AM
1 & 2. You can modify the menu in the menucreate event of the column:
https://docs.sencha.com/extjs/4.2.5/#!/api/Ext.grid.column.Column-event-menucreate
Not sure exactly what you are asking on 1.

3. Looks like clipboard plugin was introduced later in 5.1 http://docs.sencha.com/extjs/5.1.0/Ext.grid.plugin.Clipboard.html