Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User Skeleton's Avatar
    Join Date
    Mar 2007
    Location
    İstanbul
    Posts
    68
    Vote Rating
    0
    Skeleton is on a distinguished road

      0  

    Default [Grid] autoSizeColumns doesn't consider the vertical scroll

    [Grid] autoSizeColumns doesn't consider the vertical scroll


    Whenever I set autoSizeColumns property to true while constructing a grid, it doesn't consider the vertical scrollbar width (which is shown when there are rows that doesn't fit in viewport of grid). So this results an ugly horizontal scrollbar. I know the scrollbar widths are slightly differnt on different platforms (even on the same platform using different OS level skins/themes) but it would be good to consider that width approximately 20-30px and calculate the column widths accordingly.

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    Is you data inline or loaded async?

  3. #3
    Sencha - Community Support Team JeffHowden's Avatar
    Join Date
    Mar 2007
    Location
    Forest Grove, OR
    Posts
    1,038
    Vote Rating
    1
    JeffHowden is on a distinguished road

      0  

    Default


    Mine is loaded asynch and it does what the OP describes both with autoWidth set to true or autoSizeColumns set to true.

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    As in .33, autoSizeColumns config option will only work with inline data. The problem is it doesn't know if your store is loading async, if it's already been loaded, etc. However, you can do:

    Code:
    ds.on('load', function(){
        grid.getView().autoSizeColumns();
    }, false, {single:true});
    The single:true option is so it only does it on the first load, in case they have resized columns.

  5. #5
    Sencha - Community Support Team JeffHowden's Avatar
    Join Date
    Mar 2007
    Location
    Forest Grove, OR
    Posts
    1,038
    Vote Rating
    1
    JeffHowden is on a distinguished road

      0  

    Default


    Thanks Jack, that worked a treat. I found something interesting though. I happened to have another ds.on('load', ...) applied. I couldn't mix them because the other one I want/need to have run everytime the datastore loads. I discovered that the order is crucial. If I specify the one in your response first, then it throws a JS error:

    Code:
    l has no properties
    http://ondemand.aicproperties.com/sc...t-all-debug.js
    Line 1320
    However, if I place it after my original one, it executes without any troubles.

    Throws the error:

    Code:
              ds.on('load', function() {
                grid.getView().autoSizeColumns(); 
              }, false, { single: true });
    
              ds.on('load', function() {
                  var count = ds.getCount();
                  var msg = count == 0 ?
                      'Data not available for this view.' :
                      String.format(
                          'Displaying {0} - {1} of {2}',
                          paging.cursor + 1, paging.cursor + count, ds.getTotalCount()
                      );
                  displayInfo.update(msg);
                  fewer.setDisabled(paging.pageSize <= 20);
                  more.setDisabled(paging.pageSize + 20 >= ds.getTotalCount());
              });
    Does not throw the error

    Code:
              ds.on('load', function() {
                  var count = ds.getCount();
                  var msg = count == 0 ?
                      'Data not available for this view.' :
                      String.format(
                          'Displaying {0} - {1} of {2}',
                          paging.cursor + 1, paging.cursor + count, ds.getTotalCount()
                      );
                  displayInfo.update(msg);
                  fewer.setDisabled(paging.pageSize <= 20);
                  more.setDisabled(paging.pageSize + 20 >= ds.getTotalCount());
              });
    
              ds.on('load', function() {
                grid.getView().autoSizeColumns(); 
              }, false, { single: true });

  6. #6
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    This is fixed Jeff. Sorry about that.

Similar Threads

  1. Grid autoSizeColumns horizontal scrollbar
    By Rasmus in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 14 Jun 2007, 5:06 AM
  2. Should grid.reconfigure autoSizeColumns? hide/show autoSize?
    By KRavEN in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 28 Mar 2007, 6:57 AM
  3. [grid] autoSizeColumns && autoExpandColumn errors
    By nassaja-rus in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 16 Mar 2007, 3:47 AM
  4. Grid with autoSizeColumns:true hides sort indicator
    By tryanDLS in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 3 Mar 2007, 2:15 PM
  5. Grid with vertical AND horizontal headers?
    By Kikinou in forum Community Discussion
    Replies: 8
    Last Post: 28 Dec 2006, 4:52 PM

Thread Participants: 2