1. #81
    Sencha User
    Join Date
    Oct 2011
    Posts
    26
    Vote Rating
    1
    hundare is on a distinguished road

      0  

    Default

    Quote Originally Posted by ynikulin View Post
    Try this solution. Works in all browsers

    PHP Code:
    .x-grid-row ,.x-grid-cell, .x-unselectable, .x-unselectable * {
     -
    webkit-user-selecttext !important;
     -
    o-user-selecttext !important;
     -
    khtml-user-selectall !important;
     -
    ms-user-selecttext !important;
     
    user-selecttext !important;
     -
    moz-user-selecttext !important;

    PHP Code:
     if(typeof Ext != 'undefined'){
      
    Ext.core.Element.prototype.unselectable = function(){return this;};
      
    Ext.view.TableChunker.metaRowTpl = [
       
    '<tr class="' Ext.baseCSSPrefix 'grid-row {addlSelector} {[this.embedRowCls()]}" {[this.embedRowAttr()]}>',
        
    '<tpl for="columns">',
         
    '<td class="{cls} ' Ext.baseCSSPrefix 'grid-cell ' Ext.baseCSSPrefix 'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}><div class="' Ext.baseCSSPrefix 'grid-cell-inner ' Ext.baseCSSPrefix 'unselectable" style="{{id}-style}; text-align: {align};">{{id}}</div></td>',
        
    '</tpl>',
       
    '</tr>'
      
    ];
     } 
    I get an error in IE8 saying "Ext.view.TableChunker" is null or not an object. I have placed this code in my HTML file after calling the ext.js file. Iam using ExtJS 4. Can you plz help me with this. It works fine in Safari & Firefox browsers!

    Thanks!

  2. #82
    Sencha User olecom's Avatar
    Join Date
    Oct 2011
    Location
    Republic of Belarus
    Posts
    50
    Vote Rating
    6
    olecom is on a distinguished road

      0  

    Default Making selection available in RowExpander

    Due to selection restrictions of grid design it seems like making selection available just in rowexpander is not that bad solution.

  3. #83
    Sencha User jagadeesha's Avatar
    Join Date
    Jan 2011
    Location
    Bangalore , Trianz
    Posts
    10
    Vote Rating
    0
    jagadeesha has a little shameless behaviour in the past

      0  

    Default Problem with grid text selection in Chrome Version 23.0.1271.95 m

    I got it worked on other browser's except Chrome Version 23.0.1271.95 m.

    Please help.

  4. #84
    Sencha User jagadeesha's Avatar
    Join Date
    Jan 2011
    Location
    Bangalore , Trianz
    Posts
    10
    Vote Rating
    0
    jagadeesha has a little shameless behaviour in the past

      0  

    Default

    Yes i got it worked even on webkit browser's too by adding -webkit-user-select: text !important;

    Finnaly my overriden css looks like below.
    Code:
    .x-list-body dt EM,.x-list-header-inner DIV EM,.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 !important;
        -khtml-user-select: text !important;
        -webkit-user-select: text !important;
    }

  5. #85
    Sencha User
    Join Date
    Aug 2012
    Location
    Dublin
    Posts
    72
    Vote Rating
    11
    iplanit will become famous soon enough

      0  

    Default enableTextSelection: true

    Not sure if this question was answered, but in ExtJS4 you can use
    Code:
     extend: 'Ext.grid.Panel',
     
      viewConfig: {
        enableTextSelection: true
      }
    Just in case it helps. Probably will not work in 2.x

    Regards