Ajax without th in table

Ajax without th in table

delphi10delphi10 Posts: 17Questions: 8Answers: 0

My ajax data storage in txt file.

In HTML table define columns (th).

Is it possible to define columns without th in a table in ajax mode? Dinamic generate columns inside define Dattables!

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954
    Answer ✓

    You can use columns.title to add the th for each column.

    Kevin

  • delphi10delphi10 Posts: 17Questions: 8Answers: 0

    if remove th from table and define columns: [ {title: "title1"}, ... ]
    then error Cannot read properties of undefined (reading 'aDataSort')

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Answer ✓

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

    Perhaps you can link to a test case showing the issue you are having.

    Allan

  • delphi10delphi10 Posts: 17Questions: 8Answers: 0

    I read my data from txt file in format:
    {
    "columns": [
    ["Name"],
    ["Number"]
    ],
    "data": [
    ["Tiger Nixon","1"],
    ["Garret Winters","2"]
    ]
    }

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin

    Shouldn't make any difference to how columns works. Please link to a test case as I have asked so we can offer help.

    Allan

Sign In or Register to comment.