Announcement

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

    Problem with grid header alignments

    Hi, I've tried with with both Enterprise and Graphite 8.3 skins and same result.

    Try this example:
    http://www.smartclient.com/docs/8.3/a/system/reference/SmartClient_Explorer.html?skin=Enterprise#summaryGridFS

    Use this code and you'll see the column "RAR Fund*Return (No*Ann.)" is not aligning properly to the right.

    Code:
    isc.ListGrid.create({
        ID: "companyList",
        width:600, height:520,
    		headerHeight: 42,
    headerButtonProperties:{
    			wrap:true,
    	    	hoverWidth:400, hoverHeight:100, hoverAlign:"left", hoverVAlign:"center"
    		},
    
    
        alternateRecordStyles:true,
        autoFetchData:true,
        dataSource:orderItemLocalDS,
        showAllRecords:true,
        groupByField:"category", groupStartOpen:"all",
        canEdit:true, editEvent:"click",
        
        showGridSummary:true,
        showGroupSummary:true,
        fields:[
            {name:"orderID", includeInRecordSummary:false, summaryFunction:"count"},
            {name:"itemDescription"},
            {name:"category",showGridSummary:true, 
                getGridSummary:function (records, summaryField) {
                    var seenCategories = {};
                    for (var i = 0; i < records.length; i++) {
                        seenCategories[records[i].category] = true;
                    }
                    var totalCategories = isc.getKeys(seenCategories).length;
                    return totalCategories + " Categories";
                    
                }
            },
            {name:"shipDate", showGroupSummary:true, showGridSummary:false, summaryFunction:"max"},
            
            {name:"quantity",  title:"RAR Fund*Return (No*Ann.)",showGroupSummary:false, showGridSummary:false},
            {name:"unitPrice", showGroupSummary:false, showGridSummary:false,
             formatCellValue:function (value) {
                 if (isc.isA.Number(value)) {
                    return value.toCurrencyString("$");
                 }
                 return value;
             }
            },
            {name:"Total", type:"summary", recordSummaryFunction:"multiplier",
             summaryFunction:"sum",
             showGridSummary:true, showGroupSummary:true,
             align:"right",
             formatCellValue:function (value) {
                 if (isc.isA.Number(value)) {
                    return value.toCurrencyString("$");
                 }
                 return value;
             }
            }
        ]
    })

    #2
    What's happening is that we're leaving space for the header-menu-button on the right of the button.
    You can disable this by setting leaveHeaderMenuButtonSpace to false on the field (or at the grid level for all fields).

    As an aside the effect is clearly not quite how it should be with a wrapping title like this - the gap should be visible on the right of all the text, not just the last line. We'll take a look at this internally

    Regards
    Isomorphic Software

    Comment

    Working...
    X