SmartClient_v101p_2016-02-18_PowerEdition
We have a field that has two custom grouping modes. For brevity purposes I have omitted the details of the grouping handler. When you select a grouping mode from the context menu, the mode is null. However, if you select it again, it has the correct value. This causes issues obviously as our grid is not grouped correctly the first time.
THis worked in our previous SC release, SmartClient_v91p_2014-04-10_PowerEdition
REPRO steps:
===========
1. Load test case
2. Right click Path column, Group By "Full"
3. Observe in console that the group mode is undefined
4. Repeat step 2
5. Observe in console that the group mode is noe Full
We have a field that has two custom grouping modes. For brevity purposes I have omitted the details of the grouping handler. When you select a grouping mode from the context menu, the mode is null. However, if you select it again, it has the correct value. This causes issues obviously as our grid is not grouped correctly the first time.
THis worked in our previous SC release, SmartClient_v91p_2014-04-10_PowerEdition
REPRO steps:
===========
1. Load test case
2. Right click Path column, Group By "Full"
3. Observe in console that the group mode is undefined
4. Repeat step 2
5. Observe in console that the group mode is noe Full
Code:
<!DOCTYPE html> <html> <head> <title ></title> <style> .diagInfo { font-size: 14px; font-weight: bold; padding: 5px; } </style> <script type="text/javascript" > var isomorphicDir="http://localhost:8080/isomorphic/"; </script> <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/system/modules/ISC_Tools.js"></script> <script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script> </head> <body> <script type="text/javascript"> var data = [ { project: "123 Avenue", path:"East->GA->Atlanta->Engineering", redflag: "", owner: "University of MD", ins: 33, obs: 231, unsafe: 9, safe: 222, insDate: "10/12/2011", score:"<img src='star-4.png'/>55%", score:"<img src='star-4.png'/>55%", link:"<a href=''>View Analysis</a>" }, { project: "Long Project Name", path:"East->PA->Pittsburgh->Engineering",redflag: "", owner: "University of MD", ins: 33, obs: 231, unsafe: 9, safe: 222, insDate: "10/12/2011", score:"<img src='star-4.png'/>55%", link:"<a href=''>View Analysis</a>" }, { project: "6789 Avenue B", path:"East->PA->Pittsburgh->Finance",redflag: "", owner: "University of MD", ins: 33, obs: 23, unsafe: 9, safe: 222, insDate: "10/12/2011", score:"<img src='star-4.png'/>55%", link:"<a href=''>View Analysis</a>" }, { project: "123 Avenue", path:"East->PA->Pittsburgh->Maintenance",redflag: "", owner: "University of MD", ins: 33, obs: 231, unsafe: 9, safe: 222, insDate: "10/12/2011", score:"<img src='star-4.png'/>55%", link:"<a href=''>View Analysis</a>" } ]; // ===== DO NOT REMOVE ===== var diagLabel = isc.Label.create({ ID: "diagInfo", width: "100%", styleName: "diagInfo", autoFit: true }); // ===== DO NOT REMOVE ===== </script> </head> <body> <script type="text/javascript"> // set this to the correct JIRA ticket var JIRA_TICKET = "group_regression"; // 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>")); }); isc.DataSource.create({ ID: "ds", cacheData:data, clientOnly: true }); var grid = isc.ListGrid.create({ dataSource : ds, fields: [ {name:"path", title:"Path", type:"text", groupingModes:["Normal", "Full"]}, {name:"project", title:"Project", type:"text" } ], dataFetchMode : "local", autoFetchData: true, width : 1200, align : "center", autoDraw: false, autoFitData : "vertical", autoFitMaxHeight : 600, alternateRecordStyles : true, canGroupBy : true, showGroupSummary : true, canMultiGroup : true, useAdvancedFieldPicker : true, advancedFieldPickerThreshold : 3 }); var layout = isc.VLayout.create({ width:"100%", membersMargin: 20, members: [ // ===== DO NOT REMOVE diagLabel diagLabel, // ===== place anty components here grid ] }); // =============== hierarchy grouping functionality =============== grid.handleGroupBy = function(fields) { for (var i = 0; i < fields.length; i++) { var f = grid.getField(fields[i]); console.log(f.name + " grouping mode=" + f.groupingMode); } // this method fires when the grid is grouped. Since we are modifying return true; } </script> </body> </html>
Comment