Announcement

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

    Header "Auto Fit All Columns" works not always the same

    Hi Isomorphic,

    please see this modified online sample (v10.1p_2017-10-05):
    Code:
    isc.ListGrid.create({
        ID: "countryList",
        height:224, width:"100%", alternateRecordStyles:true,
        autoFitWidthApproach:"both",
        canAutoFitFields:true,
        canSort:false,
        headerAutoFitEvent:"doubleClick",
        data: countryData,
        fields:[
            {name:"countryCode", title:"Flag Thumbnail", cellAlign:"center",
              type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
            {name:"countryName", title:"Country"},
            {name:"capital", title:"Capital"},
            {name:"continent", title:"Continent"}
        ]
    })
    This is the display after a headerMenu-AutoFit direct after start:
    Click image for larger version

Name:	AutoFitAfterStart.PNG
Views:	43
Size:	15.2 KB
ID:	249593
    This is expected, as autoFitFieldsFillViewport defaults to true.

    This is the display if you resize any (not necessary the autoFitField "country") prior to headerMenu-AutoFit:
    Click image for larger version

Name:	AutoFitAfterResize.PNG
Views:	24
Size:	15.5 KB
ID:	249594
    This matches the design if you'd add autoFitFieldsFillViewport: false and headerMenu-AutoFit directly after the start.
    So it seems resizing some column sets autoFitFieldsFillViewport: false.
    I think this is not wanted behavior as I can't find anything on it in the docs.

    Best regards
    Blama
Working...
X