How to add large data set example as responsive?

How to add large data set example as responsive?

lovertech496lovertech496 Posts: 18Questions: 4Answers: 0

Hi,

I come across https://datatables.net/extensions/scroller/examples/initialisation/large_js_source.html where 50,000 records are quickly displayed.

How to make the columns as responsive to the above example. I tried usual way but it didn't work it out.

Please help me

Thanks

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,143Questions: 26Answers: 4,736
    edited April 2023

    Did you install the responsive library? Use the download builder for this.

    Did you enable responsive by adding the responsive option? See this example.

    It could be the table is not wide enough to extend past the container thus not hiding columns. Try making the browser smaller.

    If this doesn't help then post a link to your page or a test case replicating the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10

    Kevin

  • lovertech496lovertech496 Posts: 18Questions: 4Answers: 0

    I have tried the above and it doesn't work Kevin.

    In general responsive option works but not with the example provided in the website.

    You can directly check the source in the datatables.net example in the same link

  • kthorngrenkthorngren Posts: 20,143Questions: 26Answers: 4,736

    I took the test case from your other thread and added responsive to it.
    https://live.datatables.net/nihacipu/2/edit

    It does work, here is a screenshot with the container at around 510px:

    This is at around 525px and responsive is not needed so no columns are hidden:

    Again if you are having trouble making this work the post a link to your page or a test case replicating the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • lovertech496lovertech496 Posts: 18Questions: 4Answers: 0

    Kevin, i also get green icons...However it doesn't work in actual mobile. I have tested and in mobile it got failed and it displays all the columns in shrink

  • lovertech496lovertech496 Posts: 18Questions: 4Answers: 0

    no columns are hidden but they are very small in size. i am fine with green icon with listed as one by one..but it is not actually responsive...please test the above edit or sample in the mobile....

  • kthorngrenkthorngren Posts: 20,143Questions: 26Answers: 4,736
    edited April 2023 Answer ✓

    I tried my test case on an Iphone. The columns are able to fit within the iphone screen. The data in the columns is very small However once the data in a row is longer than the container responsive will kick in:
    https://live.datatables.net/nihacipu/3/edit

    Just because you enable responsive doesn't mean columns will be hidden if they fit within the container. However you can force rows to hide if you want. See this example and this doc.

    Kevin

  • lovertech496lovertech496 Posts: 18Questions: 4Answers: 0

    Awesome....

Sign In or Register to comment.