Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Reducing column width with autoFitFieldWidths takes two attempts

    Versions tested: 8.3b/WWW Deployment, v8.3p_2012-11-21/PowerEdition Deployment

    Browsers:

    OSX: Chrome
    XP: IE8, Chrome
    Win7: IE9

    To re-create, open the sample at http://www.smartclient.com/#autofitColumnWidths

    Modify your code thus:

    Code:
    isc.ListGrid.create({
        ID: "countryList",
        height:224, width:"100%", alternateRecordStyles:true,
        autoFitWidthApproach:"both",
    
        autoFitFieldWidths:true, // Added this
    
        canSort:false,
        headerAutoFitEvent:"doubleClick",
        data: countryData,
        fields:[
    
            // Removed the autoFitWidth and add a couple of fixed widths
    
            {name:"countryCode", title:"Flag Thumbnail", cellAlign:"center", type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png",width:100},
            {name:"countryName", title:"Country" },
            {name:"capital", title:"Capital"},
            {name:"continent", title:"Continent",width:150}
        ]
    })
    Press 'Try It'

    Now re-size the 'Country' field by clicking at the right-hand edge of the 'Country' headerButton and then dragging it leftwards to make the column smaller.

    My observation is that the values in the body of the table to the right of the country field will move as if you were making the column smaller, however, the header button doesn't reduce in size as you drag your mouse.

    When you release the drag, the values snap back to their original position.

    If you then repeat this click and drag a second time, then the headerButton *does* appear to re-size and when you release, the headerButton and the values are correctly re-sized.

    NOTE If your browser window was so narrow that the ListGrid was forced to have horizontal scrolling when it first draws, then re-sizing the Country column works as expected on the first attempt.

    Also, if you try to expand the country column, it works as expected on the first attempt.

    My conclusion is that when the table is wide enough that it has spare space to allocate to the columns, that puts the country field into a state whereby it doesn't shrink correctly on first attempt.

    #2
    v9.0p_2013-07-20/EVAL Development Only

    This is still failing in exactly the same way:

    [ATTACH]5991[/ATTACH]

    The first time you resize the column the values move, but don't stay when you let go of the mouse. The second time, the columns move and the values then do stay in the expected new position.

    Comment


      #3
      This is assigned to a developer for investigation. We'll let you know when we have more information

      Regards
      Isomorphic Software

      Comment


        #4
        We've now made a change to address this issue. Please try the next nightly build

        Regards
        Isomorphic Software

        Comment


          #5
          Thanks this now works!

          Comment

          Working...
          X