Announcement

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

    includeHilitesInSummaryFields problem?

    Hello,

    We are seeing a problem where user defined highlights are being applied in grouped summary data even when we set includeHilitesInSummaryFields to false.

    To see it in action, go here
    http://www.smartclient.com/#userDefinedHilites

    Then, use the code below. Try it. Edit hilites. Enter a highlight for population greater than 0 and add formatting. When you click Save, the highlight formatting shows up in the group summary data too. We want it to only show up in the data and not in the group or grid summaries. How can we do this?


    Code:
    
    var ds = isc.DataSource.get("countryDS");
    
    isc.VLayout.create({
    	ID:"layout",
    	width:600, height:250,
    	members: [
    		isc.HLayout.create({
    			ID:"buttonLayout",
    			width:"*", height:30,
    			membersMargin: 10,
    			members: [
    				isc.IButton.create({
    				    ID: "editHilitesButton",
    				    autoFit: true,
    				    title: "Edit Hilites",
    				    click: "countryList.editHilites();"
    				}),
    				isc.IButton.create({
    				    ID: "stateButton",
    				    autoFit: true,
    				    title: "Recreate from State",
    				    click: function () {
    				        var state = countryList.getHiliteState();
    
    						countryList.destroy();
    						recreateListGrid();
    				        countryList.setHiliteState(state);
    				    }
    				})
    			]
    		})
    	]
    });
    
    // create the initial ListGrid
    recreateListGrid();
    countryList.groupBy("countryName");
    
    // function to create a new ListGrid
    function recreateListGrid() {
    	layout.addMember(isc.ListGrid.create({
    	    ID: "countryList",
    	    width:"100%", height:"*",
    	    alternateRecordStyles:true, cellHeight:22,
    	    dataSource: ds,
               showGroupSummary:true,
              showGridSummary:true,
    includeHilitesInSummaryFields:false,
    	    autoFetchData: true,
    	    canAddFormulaFields: true,
    	    canAddSummaryFields: true,
            useAllDataSourceFields:true,
    	    fields:[
    	        {name:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", 
    	            imageURLSuffix:".png"
    	        },
        
    	        {name:"population", title:"Population", formatCellValue:"isc.NumberUtil.toUSString(value)"},
    	        {name:"area", title:"Area (km²)", formatCellValue:"isc.NumberUtil.toUSString(value)"},
    	        {name:"gdp", formatCellValue:"isc.NumberUtil.toUSString(value)"},
                {name:"capital", hidden:true},
                {name:"government", hidden:true}
    	    ]
    	}));
    
    }

    #2
    includeHilitesInSummaryFields is not intended to have an effect on group/grid summary rows. The idea here is that if you have a summary field which includes data from another field (which is highlighted), this flag governs whether or not the value from the other field is rendered with highlight styling applied in the summary field.

    We don't currently have a flag for disabling highlights for group summary rows. You could have a custom getCellCSSText() which omits the highlight styling for group summaries. Something like this should work:
    Code:
    getCellCSSText : function (record, rowNum, colNum) {
        if (record && record.isGroupSummary) return "";
        return this.Super("getCellCSSText", arguments);
    }

    Comment


      #3
      Thanks, that seems to take care of the text and background highlights but doesn't remove the icons. How do you suggest we get rid of the highlight icons that are being placed in the group summary?

      Comment


        #4
        We have a developer taking a look at this.
        Can you confirm which version you're running against

        Thanks
        Isomorphic Software

        Comment


          #5
          We are running smartclient 9.0 from 7/30/13.

          Comment


            #6
            A new property, showHilitesInGroupSummary, can be used to control the display of hilites in a group summary. This feature is part of 9.0 as of nightly build 9/6/13.

            Comment


              #7
              Looks good, thanks

              Comment

              Working...
              X