SmartClient_v101p_2016-03-07_PowerEdition
When a column is set to canReorder:false, it cannot be moved. However, if using the fieldpicker, another column can be reordered, moving the column out of order.
REPRO Steps:
=========
1. Load the test case
2. Observe that Inspection ID cannot be reordered
3. Open Field Picker
4. Highlight the Region/Country Column
5. Click the Ip arrow multiple times until its moved to the first field in the list
This should not be allows, Region should not be able to move beyond the Inspector ID field.
When a column is set to canReorder:false, it cannot be moved. However, if using the fieldpicker, another column can be reordered, moving the column out of order.
REPRO Steps:
=========
1. Load the test case
2. Observe that Inspection ID cannot be reordered
3. Open Field Picker
4. Highlight the Region/Country Column
5. Click the Ip arrow multiple times until its moved to the first field in the list
This should not be allows, Region should not be able to move beyond the Inspector ID field.
Code:
<!DOCTYPE html> <html> <head> <title></title> <style> .diagInfo { font-size: 14px; font-weight: bold; padding: 5px; } </style> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Core.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Foundation.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Containers.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Grids.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Forms.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_DataBinding.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Drawing.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_PluginBridges.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/modules/ISC_Charts.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script> <script type="text/javascript" > var isomorphicDir="http://localhost:8080/isomorphic/"; // set this to the correct JIRA ticket var JIRA_TICKET = "SNT-14405"; // test data var data = [ {inspectorID:12345, region:"Northeast", inspections:206, observations:913,lastInspectionDate:new Date(2012, 8, 13), index:52.6 }, {inspectorID:67890, region:"West", inspections:66, observations:2,lastInspectionDate:new Date(2013, 2,2), index:75.3 }, {inspectorID:54321, region:"Northeast", inspections:4, observations:67,lastInspectionDate:new Date(2013,2,3), index:75.3 }, {inspectorID:09876, region:"South", inspections:24, observations:0,lastInspectionDate:new Date(2012,8,31), index:52.6 } ]; // datasource for the grid isc.DataSource.create({ ID: "ds", cacheData:data, clientOnly: true }); // once page loads set some diagnostic information, DO NOT CHANGE isc.Page.setEvent("load", function() { document.title = JIRA_TICKET + " (SmartClient version " + isc.versionNumber + ")"; var html = []; html.push("Jira: " + JIRA_TICKET); html.push("SmartClient: " + isc.versionNumber); html.push("Browser: " + navigator.appCodeName + " " + navigator.appName + " " + navigator.appVersion); diagLabel.setContents( html.join("<br>")); }); </script> </head> <body> <script> // ===== DO NOT REMOVE ===== var diagLabel = isc.Label.create({ ID: "diagInfo", width: "100%", styleName: "diagInfo", autoFit: true }); // ===== DO NOT REMOVE ===== // basic grid var grid = isc.ListGrid.create({ dataSource: ds, dataFetchMode : "local", fields: [ {name:"inspectorID", title:"Inspector ID", type:"integer", canReorder: false }, {name:"inspections", type:"integer", title:"Number of Inspections Total"}, {name:"observations", title:"# Observations"}, {name:"region", type:"text", title:"Region/Country"}, {name:"lastInspectionDate", type:"date", title:"Last Inspection"} ], autoFetchData: true, clientOnly: true, position: "relative", width : "100%", align : "center", autoFitData : "vertical", autoFitMaxHeight : 400, alternateRecordStyles : true, canAddFormulaFields : true, canAddSummaryFields : true, canGroupBy : true, canReorderFields : true, showGroupSummary : true, groupByMaxRecords : 5, useAdvancedFieldPicker: true, advancedFieldPickerThreshold: 5, autoDraw: false, badFormulaResultValue: "NA" }); // the main page layout - place all other components afetr diagLabel var layout = isc.VLayout.create({ width:"100%", membersMargin: 20, members: [ // ===== DO NOT REMOVE diagLabel diagLabel, // ===== place anty components here grid ] }); </script> </body> </html>
Comment