show every column in dataset

show every column in dataset

walczakwalczak Posts: 4Questions: 2Answers: 0

I know that i have to define every column by hand:

i.e.

columns: [
            {data: "offer_id" },
            {data: "number"}
        ]

Is there an option to show automaticaly every Datacolumn from the ajax request?

ajax resonse is like this
data.id
data.number
data.name
data.stringOne
data.stringTwo
data.stringThree

And i do not want to define every data paramter from hand.
Perhaps something like this?

columns: [all]

or ?

columns: [function ( ) {
                            allcolumns.forEach(function(value) {
                             ...?..;
                            });
                            return value;]

Any idead how to solve an elastic column definition?

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.