Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Wrong ListGrid autofitted column alignment if show/hide fields

$
0
0
SmartClient Version: v9.0_2013-07-03/LGPL Development Only (built 2013-07-03)

Browsers:
Chrome 28,
IE 10
FF 22

Steps to reproduce:

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:[
        {name:"countryCode", title:"Flag Thumbnail", cellAlign:"center",
          autoFitWidth:true, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
        {name:"countryName", title:"Country", autoFitWidth:true },
        {name:"capital", title:"Capital"},
        {name:"continent", title:"Continent"}
    ]
})

press "Try it" button.

On the created list grid try to hide/show some columns!

The alignment is broken. All headers are on the left, and values are on the right.

Attached Images
File Type: png wrong_alignment.PNG (21.8 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles