Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Stop filter from cutting off data igx-pivot-grid
posted

I am trying to set up an igx-pivot-grid:

  <div class="pivot-container">
      <igx-pivot-grid #boqPivotGrid [data]="boqGridRows" [pivotConfiguration]="pivotConfig" height="100%"  width="100%" [superCompactMode]="true" [defaultExpandState]='true' >
      </igx-pivot-grid>

      <igx-pivot-data-selector [grid]="boqPivotGrid"></igx-pivot-data-selector>

  </div>

  private configurePivotGrid() {
    this.pivotConfig = {
      columns: [

      ],
      rows: [
        { memberName: 'discipline', displayName: 'Discipline', enabled: false},
        { memberName: 'schedule', displayName: 'Schedule', enabled: false}
      ],
      values: [
        {
          member: 'quantity',
          displayName: 'Quantity',
          aggregate: {
            aggregator: IgxPivotNumericAggregate.sum,
            key: 'sum',
            label: 'Sum'
          },
          enabled: true
        },
        {
          member: 'labourCost',
          displayName: 'Labour Cost',
          aggregate: {
            aggregator: IgxPivotNumericAggregate.sum,
            key: 'sum',
            label: 'Sum'
          },
          enabled: true
        },
        {
          member: 'materialCost',
          displayName: 'Material Cost',
          aggregate: {
            aggregator: IgxPivotNumericAggregate.sum,
            key: 'sum',
            label: 'Sum'
          },
          enabled: true
        },
        {
          member: 'totalCost',
          displayName: 'Total Cost',
          aggregate: {
            aggregator: IgxPivotNumericAggregate.sum,
            key: 'sum',
            label: 'Sum'
          },
          enabled: true
        },
        {
          member: 'manhours',
          displayName: 'Manhours',
          aggregate: {
            aggregator: IgxPivotNumericAggregate.sum,
            key: 'sum',
            label: 'Sum'
          },
          enabled: true
        },
        {
          member: 'factoredManhours',
          displayName: 'Factored Manhours',
          aggregate: {
            aggregator: IgxPivotNumericAggregate.sum,
            key: 'sum',
            label: 'Sum'
          },
          enabled: true,
        },
        {
          member: 'ccr',
          displayName: 'CCR',
          aggregate: {
            aggregator: IgxPivotNumericAggregate.sum,
            key: 'sum',
            label: 'Sum'
          },
          enabled: true,
        }
      ],

      filters: [
        {
          memberName: 'drawingNumber',
          displayName: 'Drawing Number',
          enabled: true,
        },
        { memberName: 'drawingSheet', displayName: 'Drawing Sheet', enabled: false},
        { memberName: 'drawingRevision', displayName: 'Drawing Revision', enabled: false},
        { memberName: 'r6Item', displayName: 'R6 Item', enabled: false},
        { memberName: 'r7Item', displayName: 'R7 Item', enabled: false},
        { memberName: 'material', displayName: 'Material', enabled: false},
        { memberName: 'unitSymbol', displayName: 'Unit Symbol', enabled: false}
      ]
    };
  }


this works for the most part but I've noticed that for the filtering if that data is something like:

TCQT-1223-FDGG-D1.

Then for the the filter list it just comes through as D1. It's fine if I drag that item to rows instead, it'll show the full thing. It's just with the filters part it seems to cut bits off, is there a way to get it to stop doing this?
  • 2700
    Verified Answer
    Offline posted

    Hi Lewis,

    Thank you for posting to Infragistics Community!

    I have been looking into your questions and was able to reproduce the described behavior by setting up a sample app with a pivot grid, the given configuration and sample data, generated based on the provided members.

    After further investigation, I determined that this is due to the default columnDimensionSeparator, which is part of the pivot grid configuration for the pivotKeys. This separator is a dash ‘-‘ and is used when generating the unique column field values. This topic in our documentation lists the available exposed pivotKeys.

    In the pivot strategy logic, the part where filter items are generated is the following - link to the code, hence the observed.

    To work around this in your scenario, I can suggest altering the columnDimensionSeparator to another character, such as “/”, in the pivot configuration. Here is a small sample I created to demonstrate this. Please, check it out and let me know if you need any further assistance on the matter.

    Best regards,
    Bozhidara Pachilova
    Software Developer