-
18 Aug 2008 4:15 AM #21
-
18 Aug 2008 4:20 AM #22
-
18 Aug 2008 4:44 AM #23Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
1. Don't add code to ext-all.js (it complicates upgrading). Instead create an extra .js file and include it directly after ext-all.js.
2. For grouping you might need to put the template definition into the GroupingView component config instead of the viewConfig.
-
18 Aug 2008 5:01 AM #24
-
8 Sep 2008 9:20 AM #25
THX work perfect
THX work perfect
Thx a lot Condor work perfect!
It's will be a big trouble in my project and now its SOLVED
-
12 Dec 2008 1:24 PM #26
In case you are using plugins like expender, it does not solve the problem.
You will also need to override the row in the GridView.
But text selection should just be the default.
-
14 Dec 2008 4:41 PM #27
-
21 Jan 2009 5:14 AM #28
I still had an issue when doing multi-select of rows with the shift button. It would select a block of text.
To workaround this, I used a custom selModel defined on the gridpanel:
Code:var sm = new Ext.grid.RowSelectionModel(); sm.on('selectionchange', function(sm) { // only clear text selection when selecting more than one row (shift-select) if (sm.getSelections().length > 1) { // use setTimeout, because the event still has to cascade to the browser // for the text selection to happen window.setTimeout(function() { // for mozilla if (window.getSelection) { getSelection().removeAllRanges() } // for IE else if (document.selection) { document.selection.empty(); }; } , 0); }; });Code:var mygrid = new Ext.grid.GridPanel({ viewConfig: { templates: { cell: new Ext.Template( '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} x-selectable {css}" style="{style}" tabIndex="0" {cellAttr}>', '<div class="x-grid3-cell-inner x-grid3-col-{id}" {attr}>{value}</div>', '</td>' ) } }, selModel: sm, ...
-
28 Jan 2009 8:48 AM #29
Selectable grid
Selectable grid
Thanks Condor, solved my problem too.
My vote for selectable Grid.
-
5 Feb 2009 2:49 PM #30
My company is rolling out its first major project using GXT, and I've been trying to tame this grid selection bear. I've found this message thread to be most helpful. For those using GXT trying to tackle this problem, here is the closest I've come.
For Firefox, create an application-specific CSS file, and load it after ext-all.css. In your CSS file, include this:
This is an imperfect solution. Without the second entry, you cannot hold the left mouse button down and drag to select. Instead, you'll have to hold down the shift key, then click and drag for one or two characters in the first cell you wish to copy, then go to the last cell and click and drag a couple characters there. After you do this a few times, you'll get the hang of it. The benefit of doing it this way is that your cell text is properly clipped within the cell.Code:.x-grid3-row td,.x-grid3-summary-row td { -khtml-user-select: text!important; -moz-user-select: text!important; } .x-grid3-cell-inner,.x-grid3-hd-inner { overflow: visible; }
If you include the second entry above, then extended selects are easy. Just hold down the left mouse button and drag. However, cell text will overflow into adjacent cells. That looks really ugly, so we've opted to use the clumsy mechanism in the paragraph above.
GXT support team, please fix this (can't find a place to report bugs on this site
). There really needs to be a way to drag to select AND keep the text within the cell. This shouldn't be a one-or-the-other decision.
For IE and other browsers, the solution is easier. After populating your grid, include the following:
You must do this after populating your grid, not after constructing it. Now you can drag-select. Selection ends up covering not just the text in the cell, but all the white space too, so you end up with this big blue blob, but it works.Code:grid.disableTextSelection(false);
Guy Rouillier




Reply With Quote
gmail.com