Announcement

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

    Help with ListGrid Group Title

    I'm hoping someone can offer a suggestion on how to accomplish a custom group title in a listgrid.

    I'm trying add a sum value that is right justified to the default title row for each group. I'm ok with the left justified portion staying the way it is and displaying the "groupBy" field value. I just want to add the group total, which would be the sum of a different field, to the far right side of each group title row.

    Hope I explained that well - any help would be greatly appreciated!

    Thanks.

    #2
    Hi phaven,

    Take a look at getGroupTitle() and the Custom Grouping Example.

    Comment


      #3
      Thanks - I think I see how to get my subtotal. However, I'm still unclear about how to get the subtotal to appear on the far right of the group title row. Can I include html in the title? What would be the best approach?

      I'm trying to get something like:

      Group A $500.00
      Group B $200.00
      Group C $600.00

      Thanks Again!

      Comment


        #4
        Sorry... didn't realize that the spaces would be removed from my example... imagine the dollar values about six inches to the right of the "Group A, Group B, Group C" values...

        Comment


          #5
          getGroupTitle() may return HTML. You might use float:right or similar to achieve the appearance you are looking for.

          Comment


            #6
            Thanks for the info - I'll give that a try!

            Comment


              #7
              Group Total for data columns in ListGrid

              I have a list grid with columns like :

              EmpID ProjectID Jan-08 Feb-08 Mar-08 ....
              G0098 CRM-112 22/24 21/24 24/24
              G0076 CRM-112 21/24 19/24 22/24
              Project Total 43/48 40/48 46/48

              I want to group this information on project and want to show these total project hours on the project group title row so that one can see all project hours totals in one go.
              Please suggest...

              Comment


                #8
                Originally posted by Isomorphic
                Hi phaven,

                Take a look at getGroupTitle() and the Custom Grouping Example.
                Hi,

                How can I do this in SmartGWT ? Any example ?

                Best Regards
                KC

                Comment


                  #9
                  Hi

                  I don't know about GWT but my problem is still not get resolved. I need to align the group totals to the data columns. Please suggest...

                  Comment


                    #10
                    @susheelkumar: you my not want to use the ListGrid's built-in grouping functionality as it's assumptions on how groups are laid out is pretty different from what you want. Instead, just provide a dataset to the grid that has extra rows for showing totals. You can style them differently via record.baseStyle to make it clear they are totals.

                    Comment

                    Working...
                    X