How make table dynamic

How make table dynamic

gourdinagourdina Posts: 5Questions: 1Answers: 0

Hi,
I'm new with Datatables, I'm trying to use Server side for a large database and I want to render the table dynamique.
For exemple,
rows [1, 2] with sam boolean "type" == 1 and "createdAt" same datetime, I'm trying to detach them and replace a new row with a button toggle for showing and hiding rows[1,2]. I'm trying with client side but no success.

All advice is welcome.

Answers

  • allanallan Posts: 56,888Questions: 1Answers: 9,042 Site admin

    You mean row grouping? RowGroup for DataTables does that, but it doesn't do expand and collapse.

    Allan

  • kthorngrenkthorngren Posts: 16,828Questions: 25Answers: 3,989

    Expand and collapse are not built into the RowGroup extension but you can create custom code for this. There are lots of examples on the forum such as this example from this thread.

    Kevin

  • gourdinagourdina Posts: 5Questions: 1Answers: 0

    Thank, I want to add a new row (with same column’s name and with sum of certain columns ) with a button toggle for showing and hiding 2 rows, I tried without success in client side.

  • gourdinagourdina Posts: 5Questions: 1Answers: 0

    I will try to rowGroup in server side.
    Thanks a lot

  • kthorngrenkthorngren Posts: 16,828Questions: 25Answers: 3,989

    What did you try? Are you using the RowGroup extension along with the collapse//expand code from the thread I linked to?

    Maybe you can provide a link to your page or a test case showing what you are trying to do.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • gourdinagourdina Posts: 5Questions: 1Answers: 0

    Thank for the link, I always do tests on my pc with localhost because the database is MS SQM Server. Maybe I can migrate it to mysql just to test.

  • kthorngrenkthorngren Posts: 16,828Questions: 25Answers: 3,989

    Maybe one of the DT JS Bin templates will help so you don't need to create a server side environment for the test case.

    Kevin

  • gourdinagourdina Posts: 5Questions: 1Answers: 0

    Merci Kevin,
    I worked a lot today, good night. :)

    Come back tomorrow.

Sign In or Register to comment.