(1) Horizontal Scrolling: ListGrid summary row stops scrolling before body, by the width of the vertical scrollbar. In the example below, scroll the non-frozen columns all the way to the right, then note the summary cells are misaligned horizontally with the body cells.
(2) Autofit: Note that the summary values are truncated. (In this quick and dirty example I haven't done a real price calculation, etc., but it's sufficient to show the truncation issue.) When I set autofit on the ListGrid, the summary values are not autofit (which we require for readability).
(2) Autofit: Note that the summary values are truncated. (In this quick and dirty example I haven't done a real price calculation, etc., but it's sufficient to show the truncation issue.) When I set autofit on the ListGrid, the summary values are not autofit (which we require for readability).
Code:
isc.ListGrid.create({ ID: "companyList", alternateRecordStyles:true, autoFetchData:true, dataSource:orderItemLocalDS, showAllRecords:true, canEdit:true, editEvent:"click", width:400, showGridSummary:true, showGroupSummary:false, autoFitFieldWidths:true, autoFitWidthApproach: "both", fields:[ {name:"orderID", title:"ID",includeInRecordSummary:false, frozen:true, summaryFunction:"count"}, {name:"itemDescription", frozen:true}, {name:"category", frozen:true, 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",frozen:false, showGroupSummary:false, showGridSummary:false, summaryFunction:"max"}, {name:"quantity", showGroupSummary:false, showGridSummary:true}, {name:"unitPrice", showGroupSummary:false, showGridSummary:true, 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; } } ] })
Comment