View Full Version : select text in cell without editing.

Michael J.
21 Dec 2010, 4:13 AM
The problem is that I have standart two ways to make grid -
first - when cells are selectable and both editable
and second when cells are non selectable at all.
I want to be in the middle - the user can select cell text to copy it, but cannot edit. just like in standart html table.

21 Dec 2010, 5:23 AM
That's in the Grid FAQ (http://www.sencha.com/learn/Ext_FAQ_Grid#How_to_select_text_in_the_grid_.28with_the_mouse.29_so_that_it_can_be_copied_to_the_clipboard).

Michael J.
22 Dec 2010, 6:34 AM
I used the suggestion in FAQ using css then in grid cell became selectable, but I obtain a new problem when I select cell in a PropertyGrid then ALL cells under it are selected. Can I turn off this property grid behavior?

22 Dec 2010, 12:21 PM
Prefix the css rule with the cls of the grid.

Michael J.
22 Dec 2010, 1:26 PM
You mean to prefix rule in the grids where I need cells to be copied, but not in the propGrid?
But I want propGrid acts the same - be non-editable, but copy-opened.

22 Dec 2010, 11:19 PM
OK, so you want a read-only PropertyGrid? Why not use a normal GridPanel then?

Michael J.
23 Dec 2010, 4:00 AM
well, actually server side is not in mine. But it returns json format very suitable for propGrid. I didn`t expect that making propGrid read-only is not trivial, I`ve tried all the options in propGrid config, but no one of them can change it to read-only.

23 Dec 2010, 4:11 AM
What exactly does the server return? It's probably pretty easy to write a 'root' function for a normal JsonStore, so you can display the data in a GridPanel.

Michael J.
23 Dec 2010, 5:16 AM
well, of course its a solution,I`ll use it if there is no other, but really tell me llike a guru - is there way to make a propGrid non-editable?

23 Dec 2010, 5:22 AM
Return false from the beforeedit event.

ps. But you are including a lot of code for PropertyGrid that you are not really using.