ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 4 replies, has 2 voices, and was last updated by  fred33 5 months, 1 week ago.

  • Creator
    Topic
  • #35167

    fred33
    Participant

    Hi,
    all is in the title. I just want to add line, at the begining or at the end of the datagrid, who represent the sum of each column. this is the code of my datagrid

    Thanks for any idea

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #35168

    akhristiansen
    Participant

    Hello, @fred33!
    I think you could do this with 2 different ways.
    First way: . Just try to add

    ( …just add as many values to expression as you need)

    Second way: Add to columns:

    ( e.g. this is representing full path, like YourBundle/Resources/views/FolderName/total.html.twig )

    And in template you can do something like this ( …just add as many values to expression as you need)

    • This reply was modified 5 months, 1 week ago by  akhristiansen.
    • This reply was modified 5 months, 1 week ago by  akhristiansen.
    • This reply was modified 5 months, 1 week ago by  akhristiansen.
    • This reply was modified 5 months, 1 week ago by  akhristiansen.
    #35173

    fred33
    Participant

    OK @akhristiansen but in my datagrid v.total is sum for each line of Janvier, Fevrier….The total value of each line is already listed in my db.
    client Janvier Fevrier Mars……. Total
    Cli01 2 2 2 6
    cli02 1 2 1 4
    TotPerMonth 3 4 3 10

    The line totPerMonth is what i want to do

    Thanks

    #35174

    akhristiansen
    Participant

    In this case, I think you cannot do this by only datagrid`s native functionality. You could try second way ( with custom column twig template) and provide your own solution.

    #35175

    fred33
    Participant

    I think you’re right, i’m trying to do that

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.