1. #1
    Ext User
    Join Date
    Aug 2009
    Posts
    10
    Vote Rating
    0
    pake007 is on a distinguished road

      0  

    Question After re-order the columns, horizontal scroll disappears

    After re-order the columns, horizontal scroll disappears


    Hello guys,

    I am using ExtJS 2.2 and I have a editorgrid with many columns. The problem is, when I change the column order (move a column before or after another one), the horizontal scroll disappeared. Only if I resize the browser window or reload the grid, the scroll shows again.

    I tried to add code to refresh the gridview when the "columnmove" event on, but it doesn't work.

    Could someone give me some help?

  2. #2
    Ext User
    Join Date
    Aug 2009
    Posts
    10
    Vote Rating
    0
    pake007 is on a distinguished road

      0  

    Default


    I also tried gridview.updateAllColumnWidths(). can't work either

  3. #3
    Ext User
    Join Date
    Aug 2009
    Posts
    10
    Vote Rating
    0
    pake007 is on a distinguished road

      0  

    Default


    Hi, guys. I found a way to solve this bug. I add some code to the grid's viewConfig, like below:
    Code:
    grid.viewConfig = {
        listeners: {
              beforerefresh: function(v) {
                 // store the scroller div's height
                 v.scrollDivHeight = v.scroller.getHeight();
              },
              refresh: function(v) {
                 // restore the scroller div's height
                 v.scroller.setHeight(v.scrollDivHeight);
              }
          }
    }
    The reason is , I found that after column moved, the scroller div's height will increase 22px (I don't know why), that is just the scroller bar's height, so the bar is "pushed down" out of the viewport. So I store and restore the original height, then it works, but the code is really ugly

    If anyone has a better solution, I will be glad to adopt it.

Similar Threads

  1. Grid Scroll Bar disappears
    By marman in forum Ext GWT: Discussion
    Replies: 11
    Last Post: 29 Mar 2010, 12:49 AM
  2. Replies: 6
    Last Post: 26 Feb 2010, 3:57 PM
  3. Replies: 2
    Last Post: 19 May 2009, 9:48 PM
  4. Grid Columns sort order
    By Rose23 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Apr 2008, 2:21 AM
  5. dynamic order of columns in Grid.
    By varun.narang in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 16 Apr 2007, 7:56 AM

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi