[1.2] LockingGridView - Remove unselectable functionality?

  1. #1

    [1.2] LockingGridView - Remove unselectable functionality?

    Hi

    I have tried the example found at http://forums.ext.net/showthread.php...ll=1#post44126

    It's working great when using a normal gridview and also in the unlocked part of the LockingGridView
    In the locked columns I can select once only

    Do you have a hint on how to fix my issue?
    Could it be the listener not firing correctly?

    Thanks in advance /Peter
  2. #2
    Hi,

    Pleas try:
    var removeUnselectable = function (view) {
        if (view.mainBody) {
            view.mainBody.select(".x-grid3-cell-inner").set({unselectable:""});
         }
        if (view.lockedBody) {
            view.lockedBody.select(".x-grid3-cell-inner").set({unselectable:""});
         }
    };
  3. #3
    Works like a charm :-)

    Thanks a lot /Peter
  4. #4
    Updated CSS from EvilCrocos Blog

    /* allow grid text selection in Firefox and WebKit based browsers */
    .x-grid3-row td,
    .x-grid3-summary-row td,
    .x-grid3-cell-text,
    .x-grid3-hd-text,
    .x-grid3-hd,
    .x-grid3-row
    {
        -moz-user-select: inherit;
        -khtml-user-select: text;
        -webkit-user-select: text;
    }
    rgds
  5. #5
    Looks interesting, thanks for sharing.
  6. #6
    Why are grid cells unselectable anyway? Should (or why is this not) this not be an a column property that we can turn on or off rather than hacking it?
    Seems like the code goes out of its way to make cells unselectable purposely, not sure I see any benefit of that.

    Seems logical to include a property to make a grid cell selectable (and therefore right click copyable).
  7. #7
    Unselectable is a "feature" of ExtJS
    http://dev.sencha.com/deploy/ext-4.0...rray-grid.html

    Don't know the reason why it's done this way and it's a bit annoying but fortunately quite easy to fix

    rgds /Peter
  8. #8
    Maybe to don't break view and selection model functionality.

    @chearner, probably, it would be a good feature and we will try to look into it. Unfortunately, too busy here.
  9. #9
    Quote Originally Posted by Daniil View Post
    Maybe to don't break view and selection model functionality.
    Or, maybe, to don't break drag&drop functionality.

Similar Threads

  1. [1.3] Scroll not working in lockinggridview
    By plykkegaard in forum 1.x Help
    Replies: 4
    Last Post: Mar 08, 2012, 1:49 PM
  2. Bug in LockingGridView
    By tnwheeler in forum 1.x Help
    Replies: 15
    Last Post: Dec 08, 2011, 6:59 PM
  3. [CLOSED] LockingGridView with HeaderGroupRows
    By paulc in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Aug 31, 2011, 2:44 PM
  4. [CLOSED] Renderer.Fn does not work with LockingGridView
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 05, 2011, 2:56 PM
  5. [CLOSED] [1.0] LockingGridView disables mousewheel scrolling
    By jchau in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 04, 2010, 5:08 PM

Tags for this Thread

Posting Permissions