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:
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.
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} ] })
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.
Comment