PDA

View Full Version : Shift Click Select Rows without Selecting Text



echowang
20 Jun 2016, 11:29 AM
Hi,

I have enableTextSelection set to true on grid since I want to be able to select grid cells and copy paste the content. However, when I do shift-click bulk select, the cell texts are selected as well. Is there a way to disable select cell text when do shift multi select?

Any help is appreciated.

Gary Schlosberg
20 Jun 2016, 3:15 PM
Can you explain what you mean by selecting rows without selecting cell text? Can you post some of your grid config?

echowang
21 Jun 2016, 5:23 AM
The grid is using checkbox selection model, selection mode is set to MULTI, view has enableTextSelection configured as below:



Ext.create('Ext.grid.Panel', {
...
viewConfig: {
enableTextSelection: true
...
},
...
});


When I click on one row, then shift click select multiple rows, all the cell text of the selected rows are highlighted. Basically I don't want the cell text be highlighted, but I do want to be able to copy paste cell text when I am not doing a shift multi select. Not sure if it's achievable.

john.obyrne
30 Jun 2016, 11:28 AM
The grid is using checkbox selection model, selection mode is set to MULTI, view has enableTextSelection configured as below:



Ext.create('Ext.grid.Panel', {
...
viewConfig: {
enableTextSelection: true
...
},
...
});


When I click on one row, then shift click select multiple rows, all the cell text of the selected rows are highlighted. Basically I don't want the cell text be highlighted, but I do want to be able to copy paste cell text when I am not doing a shift multi select. Not sure if it's achievable.

Hi,
Did you solve your issue?
I have exactly the same problem. Hopefully CTRL-A and CTRL-Click do not have the same issue than SHIFT-Click

Thank you,
John

chamacs
13 Jul 2016, 3:53 PM
Here's a fiddle in which I believe does what you are asking for.

Hope it helps.

https://fiddle.sencha.com/#fiddle/1dju

john.obyrne
14 Jul 2016, 3:09 PM
Here's a fiddle in which I believe does what you are asking for.

Hope it helps.

https://fiddle.sencha.com/#fiddle/1dju

Nice trick, works great!
Thank you :)

echowang
3 Aug 2016, 10:41 AM
I just saw this post today, I took the same apporach!


Here's a fiddle in which I believe does what you are asking for.

Hope it helps.

https://fiddle.sencha.com/#fiddle/1dju