InitComplete and paging

InitComplete and paging

ivchoooivchooo Posts: 8Questions: 5Answers: 0

Hi, I try to use IntiComplete function to call js function when the whole table is created. But It doesn't work when I go to another page. I use initComplete to aggregate sum in a group . I add initComplete to the example :smile:
https://datatables.net/examples/advanced_init/row_grouping.html
And It's work fine when the table is generated but It crashs on page click. Any suggestions to make aggregation work though paging.

Answers

  • TheTruQTheTruQ Posts: 1Questions: 0Answers: 0
    edited April 2017

    I am experiencing this same issue. This prevents creating dynamic elements offering flexibility in my table.

    Any response? Alternatives?

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    https://datatables.net/reference/event/page is fired each time the page is changed

  • kpinkermankpinkerman Posts: 4Questions: 1Answers: 0

    I am experiencing the same thing. I cannot use the page event since that fires BEFORE the row grouping is complete. Is there an event that fires AFTER the row grouping completes?

  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,947

    Does the rowGroup.endRender fit your needs?

    Kevin

  • kpinkermankpinkerman Posts: 4Questions: 1Answers: 0

    endRender fires for each group instead of after all groups have been rendered. I may be able to use this, however, as I need to insert a header row for each of the groups. Thanks for the suggestion.

    The issue remains, however, that the initComplete event needs to fire after all the rowGroups are complete.

  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,947

    initComplete does run after the row grouping. However this is only run once after Datatables has initialized. From then on you can use the draw which is fired after rowGroup is complete. You can see an example here:

    http://live.datatables.net/yugusibo/1/edit

    First it will output the group(s) processed by rowGroup then either text indicating init complete or the draw event.

    Kevin

  • Roja_NRoja_N Posts: 1Questions: 0Answers: 0

    Hi.. I'm using Start and end Render in which on load of table i'm using collapse td i also need to collapse end render along with TD of start render can some one help me on this

  • jhomarolojhomarolo Posts: 1Questions: 0Answers: 0

    What is the alternative here? I'm having the same problem.

  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,947

    What is the alternative here? I'm having the same problem.

    Seems like there are a few different questions here. Maybe you can describe what it is you are trying to do.

    Kevin

This discussion has been closed.