Devs please give option to select text in a grid

Devs please give option to select text in a grid

It seems like it's a very common requirement to select text in a grid. I know my users demand it. There is an override for it in the grid faq for Ext 3. I just spent the last half hour or so trying to apply it to 4. It's similar, but now I have to override both View and TableChunker.

It was a good experience and I learned some new things about 4, but now I'm asking myself why. It seems like this long standing workaround deserves a new feature. Since you're so radically, redesigning the grids anyway, could you just give us a config option to make the text selectable and save everyone the hassle of having to find the overrides?

The same can be said for some of the other long standing grid cosmetic issues - letting lines wrap, for example, could be a config option.

If you don't mind doing this for every grid on the page, I'd take the direct route and override the templates that generate the html.

Both the Ext.view.TableChunker.metaRowTpl and the Ext.grid.View cls default must be modified. As an added bonus, refresh on Ext.view.Table invokes table.unselectable so you have to override this method, too.

I really, really wish this had made it into the final 4 release. The workaround for selecting text in 3.x was much easier... I just don't understand why Sencha thinks we don't need this feature. It's been in the Grid Faq for 2-3 forever. IMHO, incorporating all the hacks and workarounds from the FAQ's should have been step number 1 in the redesign process. Why make us reinvent this again?

Why was the decision made to make grid column text unselectable to begin with? Does it somehow reduce the user experience? I would say more than half of the other JavaScript based grid widgets I have found on the net also restrict cell text selection.

Why was the decision made to make grid column text unselectable to begin with? Does it somehow reduce the user experience? I would say more than half of the other JavaScript based grid widgets I have found on the net also restrict cell text selection.

I'm not sure. I've heard it theorized that there might have been some problem with other selection mechanisms on the grid (like the row selection model or selecting columns for drag and drop - features other grid widgets might have) but I don't remember any dev actually confirming this. I've never run into a problem having both.

For an interesting read, here's the original 2.x thread where Condor posted the override that made it into the Grid FAQ: