1. #291
    Ext JS Premium Member
    Join Date
    Oct 2007
    Location
    Herndon, VA
    Posts
    265
    Vote Rating
    3
    durlabh is on a distinguished road

      0  

    Default


    Quote Originally Posted by abotero View Post
    There are a problem with the Ext.ux.grid.CheckColumn. If this is in the first column the editor is displayed in the next column. I used the example from Ext 3.1.

    For now I solved it leaving the CheckColumn in the last column.
    IMO, getLockedCount method needs to be overridden in ColumnModel:

    Code:
    	getLockedCount: function() {
    		var count = 0;
    		for (var i = 0, len = this.config.length; i < len; i++) {
    			if (this.isLocked(i)) {
    				count++;
    			}
    		}
    		return count;
    	}

  2. #292
    Ext User
    Join Date
    Jun 2009
    Posts
    7
    Vote Rating
    0
    dewoob is on a distinguished road

      0  

    Default


    Hi everybody,

    some months ago, I reported a problem when hiding non-locked columns in a LockedGroupHeaderGrid. Cells of additional header rows didn't get hidden (see this post). Unfortunately, nobody could help me ...

    Meanwhile, I think I've found the reason and a solution for this issue:

    • (Un)hiding columns of additional header rows is handled by updateGroupStyles() in LockedGroupHeaderGrid.js. The updateGroupStyles() method is registered to be called in sequence after the onColumnHiddenUpdated() method. The updateGroupStyles() method needs the index of the (un)hidden column as its first parameter.

    • Bug: the updateGroupStyles() method is called with a wrong column index when hiding a non-locked column. E.g., when there are 5 locked columns (index 0-4), the index value of the first unlocked column should be 5. But when you hide the first unlocked column, 0 instead of 5 is passed to the updateGroupStyles() method. When hiding the 2nd unlocked column, the value is 1 instead of 6. Accordingly, it is 2 instead of 7 for the 3rd unlocked column, and so on.

    • I assume that the updateGroupStyles() method cannot "know" or guess whether its argument, col, is meant to be a column index of either the locked or the unlocked part of the GridView. My guess it that col would need to be an absolute index, that means, it must be relative to the GridView as a whole.

    • Now I've tried to trace back the call chain and have a look which param values would show up there. updateGroupStyles() is called in sequence after onColumnHiddenUpdated(), which is called by the LockingGridView's custom implementation of updateColumnHidden().

    • The first argument passed to updateColumnHidden() is the "absolute" index of the column that has just been (un)hidden - so this would be just what we need for the chained call of onColumnHiddenUpdated() and updateGroupStyles(). Unfortunately, the chain is not called with this correct value.

    • Within the LockingGridView's custom updateColumnHidden() method, the column index is modified in case the column isn't locked. The resulting index is then zero-based in relation to either the locked or the unlocked part of the GridView. This modified index is used for setting display styles within either the locked or the unlocked rows.

    • Just like in the GridView's original implementation of updateColumnHidden(), the onColumnHiddenUpdated() method is called afterwards, using column index as the first argument. But now, the modified column index is used - and I think that's what's wrong here.

    • Solution: save the original column index that was passed to updateColumnHidden() in a new variable and pass this value when calling onColumnHiddenUpdated().

    That's what I did in this fix; you may replace the updateColumnHidden() method in columnLock.js with this implementation:

    Code:
    updateColumnHidden : function(col, hidden){
            var originalCol = col; // save index of updated column
            var tw = this.cm.getTotalWidth();
            var lw = this.cm.getTotalLockedWidth();
            var lclen = this.cm.getLockedCount();
            this.innerHd.firstChild.firstChild.style.width = tw + 'px';
            var display = hidden ? 'none' : '';
            var hd = this.getHeaderCell(col);
            hd.style.display = display;
            var ns, gw;
            if(col < lclen) {
                ns = this.getLockedRows();
                gw = lw;
                this.lockedHd.dom.firstChild.firstChild.style.width = gw + 'px';
                this.mainWrap.dom.style.left= this.cm.getTotalLockedWidth() + 'px';
            } else {
                ns = this.getRows();
                gw = tw - lw;
                col -= lclen;
                this.innerHd.firstChild.firstChild.style.width = gw + 'px';
            }
            for(var i = 0, len = ns.length; i < len; i++){
                ns[i].style.width = gw + 'px';
                ns[i].firstChild.style.width = gw + 'px';
                ns[i].firstChild.rows[0].childNodes[col].style.display = display;
            }
            
            // call onColumnHiddenUpdated using original index of updated column
            // this.onColumnHiddenUpdated(col, hidden, tw);
            this.onColumnHiddenUpdated(originalCol, hidden, tw);
            
            delete this.lastViewWidth;
            this.layout();
        },

  3. #293
    Ext User
    Join Date
    Mar 2010
    Location
    Hyderabad
    Posts
    7
    Vote Rating
    0
    Kranthi1981 is on a distinguished road

      0  

    Default


    Hi Mankz,

    I am developing an extjs application and I have similar kind of requirements. Could u please send me the plug-ins code and an example.

    Thanking you in anticipation.

  4. #294
    Ext User
    Join Date
    May 2009
    Posts
    3
    Vote Rating
    0
    arifali is on a distinguished road

      0  

    Default My grid only showing locked columns and not un-locked columns, why?

    My grid only showing locked columns and not un-locked columns, why?


    We are using Ext 2.2. After I got the update5.zip file and followed the examples in the thread and in 'columnLockExample.js', I am getting only the locked columns shown in my grid and no unlocked columns. I even appended to the 'columnLockExample.js' the code from Condor (Ext.override(Ext.grid.LockingGridView, { ....) from some page 15/16 of thread too, but no luck.
    To give some idea, I replaced by EditorGridPanel with the LockingEditiorGridPanel and am using the Ext.grid.LockingColumnModel. Another difference is that my un-locked columns are composed of editor textfields and comboxes. Could this be the reason that my unlocked columns are actually textfields and comboxes as grid columns? Here is a snippet of my code:


    cm = new Ext.grid.LockingColumnModel([
    {header: "LSSI 1st",tooltip:"LSSI First character",dataIndex: "lssiFirstChar",hidden:false, width:50, sortable: true, locked: true},
    {header: "LSSI 2nd",tooltip:"LSSI Second character",dataIndex: "lssiSecondChar",hidden:false, width:50, sortable: true, locked: true},
    {header: "LSSI",tooltip:"LSSI",dataIndex: "lssi",hidden:false, width:40, sortable: true, locked: true},
    {header: "LSSI Suffix",tooltip:"LSSI Suffix",dataIndex: "lssiSuffix",hidden:false, width:65, sortable: true,locked: true},
    {header: "SL$ Target&nbsp;<img src='images/edit.gif'/>", tooltip:"Safety Budget $ Target", width:78,dataIndex: "safetyLevelBudget", align:"right", editor: new Ext.form.TextField({allowBlank: false}),hidden:false, sortable: true},
    {header: "FR Target % &nbsp;<img src='images/edit.gif'/>", tooltip: "FR Target",width:85,dataIndex: "fillRateTarget", align:"right", editor: new Ext.form.TextField({allowBlank: false, msgDisplay:'qtip', regex: frtargetre, regexText:'FR Target value must be < 1'}),hidden:false,renderer:fillRateTargetPercent, sortable: true},
    {header: "Min. Risk<img src='images/edit.gif'/>", tooltip: "Minimum Risk", width:70,dataIndex: "minRisk", align:"right", editor: new Ext.form.TextField({allowBlank: false}),hidden:false, sortable: true},
    {header: "Max. Risk<img src='images/edit.gif'/>", tooltip: "Maximum Risk", width:70,dataIndex: "maxRisk", align:"right", editor: new Ext.form.TextField({allowBlank: false}),hidden:false, sortable: true},
    {header: "Avg. Req. Size&nbsp;<img src='images/edit.gif'/>",tooltip:"Avg. Req. Size ",dataIndex: "averageRequisitionSize", align:"right", editor: new Ext.form.ComboBox({triggerAction: 'all',transform:'arsc',lazyRender:true,listClass: 'x-combo-list-small', forceSelection:true}),hidden:false, sortable: true},
    {header: "Crit. Spread&nbsp;<img src='images/edit.gif'/>",tooltip:"Crit. Spread",dataIndex: "critSpread", align:"right", editor: new Ext.form.TextField({allowBlank: false,regex: csharsre, msgTarget:'title', invalidText:'Valid values >= 0'}),hidden:false, sortable: true}
    ]);

    My GridPanel is:
    var grid = new Ext.grid.LockingEditorGridPanel({
    el:gridCt,
    id:'LSSIGridId',
    height:400,
    width:800,
    clicksToEdit: 1,
    store: store,
    cm: cm,
    loadMask: true,
    viewConfig: {emptyText: '<div align="center"><font size="2"><b><%=noDataFound %></b></font></div>',
    deferEmptyText: false},
    tbar: toolbar,
    stripeRows: true
    //view: new Ext.ux.grid.LockingGridView()
    });

    Please find attached screenshot showing the behavior (not-showing unlocked columns)
    Attached Images

  5. #295
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Did you include the css that comes with the extension?

  6. #296
    Sencha User
    Join Date
    Nov 2008
    Posts
    114
    Vote Rating
    0
    tomlobato is on a distinguished road

      0  

    Default Locked grid columns on Chrome

    Locked grid columns on Chrome


    Hello! Congratulations, it is a excellent port!
    I`m using this by some time, but now I noted that running on chrome there is a little problem.
    The locked columns gets a margin on top. Look the attached image.

    Below the relevant code..

    PHP Code:
     columns[0] = {header'<b>Nome</b>'width100editablefalsemenuDisabledtrue,
                                      
    sortablefalseresizablefalsedataIndex'name',
                                      
    renderer: function(value){return '<b>'+value+'</b>'}, lockedtrue}
            
    columns[1] = {menuDisabledtruewidth35editablefalserendererremoveUser,
                                      
    sortablefalseresizablefalsedataIndex'id'align'center'lockedtrue}
            
    columns[2] = {menuDisabledtruewidth35editablefalserendereraltPass,
                                      
    sortablefalseresizablefalsedataIndex'id'align'center'lockedtrue}

            for (var 
    i=0i<col_list.lengthi++) {
                    var 
    header '<font size=1>'+col_list[i][0]+'</font>'
                    
    var dataIndex col_list[i][1]
            
    columns[columns.length] = {
                
    headerheader,
                
    widthcolWidth,
                
    height30,
                            
    editabletrue,
                
    rendererrenderPer,
                
    menuDisabledtrue,
                
    sortablefalse,
                            
    resizablefalse,
                
    dataIndexdataIndex
            
    }
            }

        var 
    userGrid = new Ext.grid.LockingGridPanel({
            
    storeuserStore,
            
    columnscolumns,
            
    stripeRowsfalse,
                    
    region'center',
                    
    buttonAlign'center',
            
    cls'vline-on',
            
    viewConfig: {
                
    getRowClass: function(recordidx){
                    if (
    idx == 0)
                        return 
    'fix-top-border'
                
    }
            },
            
    borderfalse,
            
    enableHDMenufalse,
            
    enableColumnHidefalse,
            
    enableColumnMovefalse
        
    });
            
    userGrid.getSelectionModel().lock() 
    Attached Images

  7. #297
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    This is a known issue that has been fixed in the Ext 3.x version.

    But this fix was never backported to the Ext 2.x and 3.0 versions (I'm no longer using these Ext versions, so it's not very high on my todo list).

  8. #298
    Sencha User
    Join Date
    Nov 2008
    Posts
    114
    Vote Rating
    0
    tomlobato is on a distinguished road

      0  

    Default


    Hi Condor, I understand.
    A workaround for me would be to have specific columns (the locked) with header of height=0.
    Is it possible?

    Quote Originally Posted by Condor View Post
    This is a known issue that has been fixed in the Ext 3.x version.

    But this fix was never backported to the Ext 2.x and 3.0 versions (I'm no longer using these Ext versions, so it's not very high on my todo list).

  9. #299
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You're better off trying to backport the fix.

    The syncHeaderHeight method updates the height of <table> element, but it needs to update the <tr> element.

  10. #300
    Sencha User
    Join Date
    Feb 2011
    Posts
    13
    Vote Rating
    0
    Patrick86 is on a distinguished road

      0  

    Default Heigth of locked and unlocked columns are not the same

    Heigth of locked and unlocked columns are not the same


    Hi guys,
    I have this problem in the locked and unlocked columns heigth
    the rows in the Locked column remain the same height as default, which makes a bad effect - rows in the Locked column do not match the rows in the other (not locked) columns. the heigth is not equal (see joined picture)
    . I applicate all the propositions given in this thread but no effect.still the same problem
    I wait for u answer
    tyissue.jpg

Thread Participants: 138

  1. galdaka (2 Posts)
  2. Condor (47 Posts)
  3. mapo (1 Post)
  4. seno (1 Post)
  5. rmesser (2 Posts)
  6. mystix (5 Posts)
  7. fangzhouxing (1 Post)
  8. rarerules (6 Posts)
  9. Kalum78 (2 Posts)
  10. Fabyo (2 Posts)
  11. akannu (4 Posts)
  12. badgerd (1 Post)
  13. hanganum (1 Post)
  14. jlhs5 (3 Posts)
  15. zaunaf (1 Post)
  16. mjlecomte (1 Post)
  17. border9 (3 Posts)
  18. matt.hall (1 Post)
  19. justinfalk (1 Post)
  20. Air_Mike (1 Post)
  21. mbalusu (1 Post)
  22. wm003 (2 Posts)
  23. Plater (1 Post)
  24. ssmso (3 Posts)
  25. jitu (1 Post)
  26. durlabh (2 Posts)
  27. crpatrick (2 Posts)
  28. timezz (2 Posts)
  29. jfkelley (2 Posts)
  30. mankz (6 Posts)
  31. xbohdpukc (1 Post)
  32. orangehairedboy (1 Post)
  33. mbahl (2 Posts)
  34. cblin (3 Posts)
  35. vertigoMX (1 Post)
  36. bernd01 (1 Post)
  37. sanjshah (1 Post)
  38. tahlon (1 Post)
  39. nanich (3 Posts)
  40. tonedeaf (1 Post)
  41. gaspard (1 Post)
  42. ghutchens (3 Posts)
  43. wsn24x7 (1 Post)
  44. srikan999 (1 Post)
  45. lesul (2 Posts)
  46. NotChris (3 Posts)
  47. NeonMonk (3 Posts)
  48. surgi (3 Posts)
  49. lickui (2 Posts)
  50. sureshraja.crt (1 Post)
  51. herrjj (1 Post)
  52. minty (2 Posts)
  53. huixjan (2 Posts)
  54. archrajan (1 Post)
  55. milou (1 Post)
  56. bishoco (1 Post)
  57. deltron0 (1 Post)
  58. ravindra.tiwary1 (2 Posts)
  59. slava_k (1 Post)
  60. cjqcjq2008 (1 Post)
  61. srikanthnukala (1 Post)
  62. Kevin.Tan (3 Posts)
  63. xavierg (1 Post)
  64. ygl (1 Post)
  65. varsha.kothari (3 Posts)
  66. tinnt (6 Posts)
  67. sdileep (1 Post)
  68. rule3 (3 Posts)
  69. RobinOuyang (1 Post)
  70. lokiofragnar (1 Post)
  71. imran (1 Post)
  72. sachin_248 (1 Post)
  73. mogen9999 (2 Posts)
  74. faraway (1 Post)
  75. sircyaj (1 Post)
  76. tmaung (1 Post)
  77. wwwtd (1 Post)
  78. jamiro (1 Post)
  79. Frankatron (3 Posts)
  80. peacock (1 Post)
  81. NicoP (2 Posts)
  82. Raz_ (3 Posts)
  83. jchau (6 Posts)
  84. sanjaykanteti (1 Post)
  85. JSRobbie (1 Post)
  86. alvin (1 Post)
  87. Shmitt (1 Post)
  88. Nagiy (4 Posts)
  89. cooluser7 (1 Post)
  90. Angelina (1 Post)
  91. greeeg (2 Posts)
  92. hoanganhinfo (1 Post)
  93. duverma (1 Post)
  94. hawks2001 (1 Post)
  95. LoekieBoy (3 Posts)
  96. Bogdan Juszczak (1 Post)
  97. eversound (1 Post)
  98. priyanka_iknip (1 Post)
  99. xiespirit (1 Post)
  100. mmboy (1 Post)
  101. SMIRZA (1 Post)
  102. fmanrique (2 Posts)
  103. redzedi (1 Post)
  104. sham123456 (1 Post)
  105. digiprosoft (2 Posts)
  106. krmlmnstr (1 Post)
  107. abotero (1 Post)
  108. tomlobato (2 Posts)
  109. sramanna (2 Posts)
  110. kastanis (5 Posts)
  111. pingTeam (1 Post)
  112. cmschick (2 Posts)
  113. liulei (3 Posts)
  114. Xander75 (2 Posts)
  115. hhanna (2 Posts)
  116. hahacow (1 Post)
  117. janapol (1 Post)
  118. roderick.wu (5 Posts)
  119. saadus (1 Post)
  120. yingwuhahaha (2 Posts)
  121. liuzxtest (2 Posts)
  122. hzwei (5 Posts)
  123. azaqero (3 Posts)
  124. PCalvinClark (1 Post)
  125. arifali (1 Post)
  126. navdimri (2 Posts)
  127. dewoob (2 Posts)
  128. avia4us (1 Post)
  129. DirkWei (1 Post)
  130. setzor (1 Post)
  131. ancorgs (2 Posts)
  132. Sergii (1 Post)
  133. Kranthi1981 (1 Post)
  134. Patrick86 (1 Post)
  135. kamal.addicted (1 Post)
  136. chpsrinu (1 Post)
  137. brian.moeskau (2 Posts)
  138. priyapratheep (1 Post)