-
4 Jun 2009 9:18 AM #11
I'm not sure about which css is applied that disable the selection.
I am using the row selection model and I use Inspect function in the Firebug, see the class for a cell's inner text is using the css:
x-grid3-cell-inner x-grid3-col-NN (NN is the column number of that cell)
Then I add:
to the 'x-grid3-cell-inner' css definition.Code:"-moz-user-select: text; -moz-user-focus: normal;"
But still not able to highlight the cell and select the text.
ANYONE Know the CSS please help
good good study,
day day up ; )
-
7 Jun 2009 12:20 PM #12
-
13 Jul 2009 7:55 AM #13
This a GXT forum guys... not ext-js....
-
11 Jul 2010 10:42 PM #14
I added the following code so that clicking a button selects / highlights the whole grid and then you can use the browser's copy function (menus or ctrl-c)
The selectElement method creates ranges for W3C compliant browsers or IECode:public void selectForCopy() { El el = grid.getView().getScroller().getParent(); selectElement(el.dom); }
See:
http://www.quirksmode.org/dom/range_intro.html
http://help.dottoro.com/ljgbbkjf.php
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
Code:private static native void selectElement(Element element)/*-{ if ($wnd.getSelection) // W3C { var range = $doc.createRange(); range.selectNodeContents(element); $wnd.getSelection().addRange(range); } else if ($doc.selection) // IE { var range = $doc.body.createTextRange(); range.moveToElementText(element); range.select(); } }-*/;
-
18 Jan 2012 9:54 PM #15
This solution working for all browsers
This solution working for all browsers
grid.disableTextSelection(false);


Reply With Quote