ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: EPM Solutions on August 09, 2017, 07:26:58 pm

Title: How can we display the summary in row grouping ?
Post by: EPM Solutions on August 09, 2017, 07:26:58 pm
How can I display the summary on top instead of bottom of the row? I wanted to display summary similar to the attached images.


 or Is that possible to display the row grouping name with subtotal in summary?
 General Requirements Subtotal   or Initiation Subtotal

   
Title: Re: How can we display the summary in row grouping ?
Post by: paramvir on August 09, 2017, 09:57:45 pm
Your screenshot is missing, but I guess we already discussed it in this post.

https://paramquery.com/forum/index.php?topic=2191
Title: Re: How can we display the summary in row grouping ?
Post by: EPM Solutions on August 09, 2017, 10:11:11 pm
What changes I need to do to achieve my requirement this is very urgent ?for alternative approach can we display the groping Name in summary row at bottom - see the attached screenshot.


I may need to find out any other grid plugins if this is not working but I hope this features should be available. 
Title: Re: How can we display the summary in row grouping ?
Post by: paramvir on August 09, 2017, 11:16:41 pm
I've updated this demo to display group titles in corresponding summary rows.

https://paramquery.com/pro/demos/group_rows_hidden

Hope it helps.
Title: Re: How can we display the summary in row grouping ?
Post by: EPM Solutions on August 10, 2017, 12:07:56 pm
Thanks I have used the the below code

columnTemplate: {
                render: function(ui){
               var rd = ui.rowData,
                       level = rd.pq_level;
                    if(level != null){
                        //to display group titles in first visible cell of summary rows.
                  if(rd.pq_gsummary && this.getFirstVisibleCI() == ui.colIndx){
                     
                     var data = this.pageData(), i = ui.rowIndx, dis = this.option('groupModel.dataIndx');
                     while(i--){
                        rd = data;
                        if(rd.pq_level == level){                        
                           return {text: "<i>" + rd[ dis[ level ] ] + ":</i>", style: "text-align:right;"};
                        }
                     }
                     
                  }
                  else{
                            //to indent group titles.
                     return {style: "padding-left:"+(level*20)+"px;"};
                  }                       
                    }
                }
            },           


this.getFirstVisibleCI() == ui.colIndx condition always returning false not going in if condition

Where I am doing wrong Please suggest?
Title: Re: How can we display the summary in row grouping ?
Post by: paramvir on August 10, 2017, 06:17:43 pm
Could you please share a jsfiddle?
Title: Re: How can we display the summary in row grouping ?
Post by: EPM Solutions on August 10, 2017, 07:05:26 pm
Pls. check

https://jsfiddle.net/g1f0ego5/
Title: Re: How can we display the summary in row grouping ?
Post by: paramvir on August 10, 2017, 09:41:10 pm
your jsfiddle is incomplete, there is no output.

Please include the necessary scripts. this jsfiddle http://jsfiddle.net/0wgs1orb/ can be used to include js & css dependencies.

and remote data can be replaced by local data.