Can i customize the datatable property names

Can i customize the datatable property names

prashant530prashant530 Posts: 2Questions: 1Answers: 0

Hi ,

I would like to know if I can change or customize my datatable properties as that of my model properties?

Also, can you please tell me if I could pass the sortcolumn and sortorder as strings rather than int or array?

Thanks in advance.

Prashant.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin
    Answer ✓

    I would like to know if I can change or customize my datatable properties as that of my model properties?

    Do you mean changing, for example, order to be called tableOrder? If so, sure, modify the DataTables source code.

    Also, can you please tell me if I could pass the sortcolumn and sortorder as strings rather than int or array?

    You could use the column().index() method to convert the string selector / name into the column index.

    Allan

This discussion has been closed.