Hi Isomorphic,
I've been trying had to reproduce an error that has been in our app for a long time.
I'm still not successful, but perhaps you have an suggestion. It's a complicated ListGrid, but my gut feeling says it's somehow just related to the rowNum field.
The issue is that if you show a filterRow and then resize a column, the filterRow field positions are all wrong by a fixed offset, because the "filterfield" (disabled by default of course) over the rowNum field is too wide.
Do you have an idea what might be causing this? I've thrown in all features here, but it does not happen in the showcase (v12.0p_2020-04-10, we use v12.0p_2020-03-11).
I'll include a video from my app and the testcase I made so far (based on this sample, issue does not occur there, way too complicated in the end I assume, but left like this for future reference).
Thank you & Best regards
Blama
I've been trying had to reproduce an error that has been in our app for a long time.
I'm still not successful, but perhaps you have an suggestion. It's a complicated ListGrid, but my gut feeling says it's somehow just related to the rowNum field.
The issue is that if you show a filterRow and then resize a column, the filterRow field positions are all wrong by a fixed offset, because the "filterfield" (disabled by default of course) over the rowNum field is too wide.
Do you have an idea what might be causing this? I've thrown in all features here, but it does not happen in the showcase (v12.0p_2020-04-10, we use v12.0p_2020-03-11).
I'll include a video from my app and the testcase I made so far (based on this sample, issue does not occur there, way too complicated in the end I assume, but left like this for future reference).
Code:
isc.ListGrid.create({ ID: "countryList", width:800, height:500, alternateRecordStyles:false, showRowNumbers: true, canRemoveRecords: true, removeFieldProperties: {width:24, canDragResize: true}, virtualScrolling: false, showRecordComponents: true, showRecordComponentsByCell: true, recordComponentPoolingMode: "recycle", showGridSummary:true, showGroupSummary:true, groupByField:"continent", dataSource: worldDS, fields:[ {name:"countryCode", width:60}, {name:"buttonField", title: "Info", align: "center", width: 110, minWidth: 110, maxWidth: 110, canDragResize: false, canFilter:false}, {name:"iconField", title: "Comments/Stats", width: 110, minWidth: 110, maxWidth: 110, canDragResize: false, canFilter:false}, {name:"countryName"}, {name:"capital"}, {name:"continent"}, {name:"myDate", type: "date"}, {name:"area", formatCellValue: "isc.NumberUtil.format(value, ',0') + ' km²'"}, {name:"population", formatCellValue: "isc.NumberUtil.format(value, ',0') + ' inhab.'"} ], autoFetchData: true, allowFilterExpressions: true, headerSpans: [ { fields: ["area", "population"], title: "Numbers" }, { fields: ["countryName", "continent"], title: "Names" } ], createRecordComponent : function (record, colNum) { var fieldName = this.getFieldName(colNum); if (fieldName == "iconField") { var recordCanvas = isc.HLayout.create({ height: 22, width: "100%", align: "center" }); var editImg = isc.ImgButton.create({ showDown: false, showRollOver: false, layoutAlign: "center", src: "icons/16/comment_edit.png", prompt: "Edit Comments", height: 16, width: 16, grid: this, click : function () { isc.say("Edit Comment Icon Clicked for country : " + record["countryName"]); } }); var chartImg = isc.ImgButton.create({ showDown: false, showRollOver: false, layoutAlign: "center", src: "icons/16/chart_bar.png", prompt: "View Chart", height: 16, width: 16, grid: this, click : function () { isc.say("Chart Icon Clicked for country : " + record["countryName"]); } }); recordCanvas.addMember(editImg); recordCanvas.addMember(chartImg); return recordCanvas; } else if (fieldName == "buttonField") { var button = isc.IButton.create({ height: 26, width: 65, layoutAlign: "center", icon: "flags/16/" + record["countryCode"] + ".png", title: "Info", click : function () { isc.say(record["countryName"] + " info button clicked."); } }); return button; } else { return null; } }, updateRecordComponent: function (record, colNum, component, recordChanged) { var fieldName = this.getFieldName(colNum); if (fieldName == "iconField") { var membersArray = component.getMembers(); for (i=0;i<membersArray.size;i++) { if (i == 0) { membersArray[i].addProperties({ click : function () { isc.say("Edit Comment Icon Clicked for country : " + record["countryName"]); } }); } else { membersArray[i].addProperties({ click : function () { isc.say("Chart Icon Clicked for country : " + record["countryName"]); } }); } } } else if (fieldName == "buttonField") { component.addProperties({ icon: "flags/16/" + record["countryCode"] + ".png", click : function () { isc.say(record["countryName"] + " info button clicked."); } }); } else { return null; } return component; } }) isc.IButton.create({ ID:"filterButton", title:"Filter", click : function () { countryList.setShowFilterEditor(!countryList.showFilterEditor); } }) isc.HLayout.create({ width: "100%", height: "100%", members: [ countryList, isc.LayoutSpacer.create({ width: 20 }), filterButton] });
Thank you & Best regards
Blama
Comment