How to do dynamic column creation and load data in that column ?

How to do dynamic column creation and load data in that column ?

arsalansiddiquiarsalansiddiqui Posts: 71Questions: 12Answers: 0

Link to test case:

VIDEO:
https://streamable.com/vo0g9k

Debugger code (debug.datatables.net):

Error messages shown:

Description of problem:

I want dynamic column creation which add a row then fill column cells with respect to associated data, by doing this will take my hassle to click and load data on demand, user will only click to show that column than all that column data is displayed.

Answers

  • arsalansiddiquiarsalansiddiqui Posts: 71Questions: 12Answers: 0

    This is datatable:

    VIDEO:
    https://gofile.io/d/rbGK5c

    DataTable does not make ajax request to show/hide/generate column

  • colincolin Posts: 9,791Questions: 0Answers: 1,620
  • arsalansiddiquiarsalansiddiqui Posts: 71Questions: 12Answers: 0

    I have colvis, thats what i'm showing video in comment. I want something that's in post

  • arsalansiddiquiarsalansiddiqui Posts: 71Questions: 12Answers: 0

    Ajax based solution actually

  • colincolin Posts: 9,791Questions: 0Answers: 1,620

    I'm not too clear what you're after, you need to give longer replies saying what you're trying to do. That said, you can't add columns dynamically, and once configured, DataTables expects the data for all columns to always be returned - so even if it's not visible, the data would be expected to be in the JSON,

    Colin

  • arsalansiddiquiarsalansiddiqui Posts: 71Questions: 12Answers: 0

    got it, but dynamically creation and retrieving/rendering will give another boost to table, can it will be available in future versions.

  • colincolin Posts: 9,791Questions: 0Answers: 1,620

    That's unlikely, it's not a priority for us. That said, DataTables is open source, so you can make those changes yourself if they're necessary for you,

    Colin

Sign In or Register to comment.