Author Topic: Customize the Summary Title appearing for group summary row  (Read 4990 times)

supriya.khamesra

  • Newbie
  • *
  • Posts: 12
    • View Profile
Customize the Summary Title appearing for group summary row
« on: December 21, 2017, 07:45:02 pm »
I am using the PQ grid for showing the data with grouping and rolling up the sum of the rows to the group summary row. I am facing below issues:
1. My requirement is to remove the "Sum: " text preceding the value.
2. I want to customize the Title of the group which currently appear as Value (item count) . I don't want to show the item count and also want to retrieve a sub string of the text.
3. The Sum displayed for summary row shows a drop down on click. Can I disable it as donot want the user to select any other option. Want to display sum only.
4. Can we rename the group header information.

Screen shot as attached.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Customize the Summary Title appearing for group summary row
« Reply #1 on: December 21, 2017, 10:05:12 pm »
1. My requirement is to remove the "Sum: " text preceding the value.

use summaryTitle to customize it.
https://paramquery.com/pro/api#option-summaryTitle

2. I want to customize the Title of the group which currently appear as Value (item count) . I don't want to show the item count and also want to retrieve a sub string of the text.

use groupModel.titleDefault https://paramquery.com/pro/api#option-groupModel

3. The Sum displayed for summary row shows a drop down on click. Can I disable it as donot want the user to select any other option. Want to display sum only.

groupModel.summaryEdit = false

4. Can we rename the group header information.

Sorry, question not clear.


Please refer to this example plnkr for above customizations: https://plnkr.co/edit/zo6TdOvweAFvWM5JLasV?p=preview
« Last Edit: December 22, 2017, 12:51:15 pm by paramquery »

supriya.khamesra

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Customize the Summary Title appearing for group summary row
« Reply #2 on: December 22, 2017, 07:12:45 pm »
Thanks for the solutions.
For the point (4) Can we rename the group header information.
I want to say that as in the image in the group header we have 2 buttons with name "Level2" and "Level3" can we rename the text of these.

Also for customizing the group title when I used groupModel.titleDefault I was able to set the customize title but I want to set different substring rule for the first and second groups .Is it possible?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Customize the Summary Title appearing for group summary row
« Reply #3 on: December 22, 2017, 09:49:23 pm »
1. Those are same as column titles, they can't be set differently.

2. Yes, please use groupModel.title instead of groupModel.titleDefault

https://paramquery.com/pro/api#option-groupModel

supriya.khamesra

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Customize the Summary Title appearing for group summary row
« Reply #4 on: December 22, 2017, 10:26:55 pm »
Can you provide me an example to write callback function for groupmodel.title to set different custom title for 2 group columns