Announcement

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

    How to prevent default summary function based on field type

    We have many datasource fields that are type="integer" but for which a sum is not meaningful. When these fields are included in a grid that shows group or grid summaries they are automatically summed.

    We had been putting summaryFunction="null" in the ds.xml for these fields, which had the desired behavior of preventing the automatic summarization, but this no longer works.

    #2
    You should be able to prevent this via "showGridSummary" / "showGroupSummary" being set to false.

    Comment


      #3
      I've tried that too. showGridSummary="false" showGroupSummary="false" in the field element, but that doesn't work either. It seems like a problem with the internal schema used convert the field attributes. If I evaluate the ListGridField once the grid has been created, these fields have showGroupSummary: "false" instead of showGroupSummary: false
      Code:
      {title: "Color",
      showGridSummary: "false",
      displayField: "CLRN",
      columnCode: "a5f55d7b2c0cbd38bd7e42f487973870",
      showGroupSummary: "false",
      primaryKey: true,
      name: "itemColor",
      valueField: "CCLR",
      type: "integer",
      optionDataSource: "IPCOLOR",
      canEdit: false,
      editorType: "CanvasItem",
      validators: Array[1],
      editorProperties: Obj,
      sortDirection: "ascending",
      align: "left",
      masterIndex: 5,
      originalSortDirection: "ascending",
      prompt: "Color",
      valueMap: Obj}

      Comment


        #4
        These attributes are really specific to ListGridFields rather than DataSourceFields, which is why they're not currently part of that schema, so the string isn't getting converted to the boolean type value.
        I'll pass this over to the development team for consideration as to whether this should be supported in this way, but regardless you can use "<JS>" tags to write out literal javaScript in your .ds.xml file, like this:
        Code:
        <showGridSummary><JS>false</JS></showGridSummary>
        <showGroupSummary><JS>false</JS></showGroupSummary>
        Regards
        Isomorphic Software

        Comment


          #5
          Thanks. That works. Nice to know about the <JS> literals.

          Comment

          Working...
          X