Add an id to each column of a row

Add an id to each column of a row

MolaxMolax Posts: 3Questions: 2Answers: 0
edited March 2016 in Free community support

Hi , i have a datatable like

                aluno.global.table = $('#tableAluno').DataTable({
                    "bScrollInfinite": false,
                    "bScrollCollapse": true,
                    "sScrollY": "500px",
                    "bPaginate": false,
                    data: data,
                    columns: [
                        { data: 'PK_STUDENT' },
                        { data: 'NAME' },
                        { data: 'CPF' },
                        { data: 'EMAIL' },
                        { data: 'PASSWORD' }
                    ]
                });

i want to put on each " data : 'example' " an specific ID on each of those.

can anyone please help me with that?

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin

    I don't know what data: 'example' is, but you can use columns.createdCell to add an id to each cell.

    Allan

This discussion has been closed.