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

[Bug on demo site] TreeGrid auto-fit on frozen tree column is brocken

$
0
0
In the link below if you add autoFitWidthApproach: "both" to the source code and try to auto-fit all columns - Name column gets cut off

http://www-demos.smartclient.com/iso...tml#freezeTree

Also with autoFitWidthApproach: "both" - calling autoFitFields() programmatically ignores this setting and auto-fits values, not headers
Example here
http://www-demos.smartclient.com/iso...childrenArrays

I added autoFitWidthApproach: "both", setFields(), and autoFitFields() and the result fits EmployeeId field to values only.
If you call Auto Fit All columns from header menu - EmployeeId field autofits fine but not the Name field
Code:

isc.TreeGrid.create({
    ID: "employeeTree",

    data: isc.Tree.create({
        modelType: "children",
        nameProperty: "Name",
        childrenProperty: "directReports",
        root: {EmployeeId: "1", directReports: [
            {EmployeeId:"4", Name:"Charles Madigen", directReports: [
                {EmployeeId:"188", Name:"Rogine Leger"},
                {EmployeeId:"189", Name:"Gene Porter", directReports: [
                    {EmployeeId:"265", Name:"Olivier Doucet"},
                    {EmployeeId:"264", Name:"Cheryl Pearson"}
                ]}
            ]}
        ]}
    }),

    autoFitWidthApproach: "both",

    // customize appearance
    width: 500,
    height: 400,
    nodeIcon:"icons/16/person.png",
    folderIcon:"icons/16/person.png",
    showOpenIcons:false,
    showDropIcons:false,
    closedIconSuffix:""
});


employeeTree.setFields([
    {name:"Name", frozen:true},
    {name:"EmployeeId"}
]);


employeeTree.getData().openAll();

employeeTree.autoFitFields();


Viewing all articles
Browse latest Browse all 4756