Author Topic: How can we add a drop down in Group Summary cell with value of grouped column?  (Read 2219 times)

EPM Solutions

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 182
    • View Profile
Hello Team,

We want to add a drop down (choice) in cell of group column as we are adding in a cell of normal param query grid.

Our requirement is to add a drop down as CO# column in the cell of group column as shown in image.

Can you please help us to add it?

We created an problem plunkr here.

Problem plnkr URL:
https://stackblitz.com/edit/js-vhnf4a?file=index.html

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6122
    • View Profile
Please let me know what you want to do with a drop down in the group title column.

EPM Solutions

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 182
    • View Profile
Hello team,

We want to Change the grouping as per the values in drop-down.

We need same functionality in group title as its is working in CO# column.

Suppose if we are selecting CO#2 in place of CO#1 as shown in previous image then items in CO#2 Group title become two as showing in below image.
 
Please if possible update the below plunkr URl with solution.

plunkr URL: https://stackblitz.com/edit/js-vhnf4a?file=index.html
« Last Edit: July 08, 2020, 04:16:36 pm by EPM Solutions »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6122
    • View Profile
Thanks for the description, I'm looking into it.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6122
    • View Profile
You could use a change event to update the children values.

Code: [Select]
      change: function(evt, ui){
        //debugger;       
        var ul = ui.updateList[0],
          rowData = ul.rowData,
          newVal = ul.newRow.grp,
          oldVal = ul.oldRow.grp;
        if(rowData.pq_gtitle && newVal){
          rowData.children.forEach(function(rd){
            rd.CO = newVal;
          })
          this.refreshView();//regroup data.         
        }       
      }

https://stackblitz.com/edit/js-mmmpfo?file=index.html