Define where DT_RowId is defined

Define where DT_RowId is defined

missenlinxmissenlinx Posts: 3Questions: 1Answers: 0

Howdy,

I am not using a flat array and DT_RowId is defined by default within aaDate. Is there anyway to define exactly where DT_RowID is located in my JSON array. As per https://gist.github.com/AshHimself/5128448a569d5653eadc I would like use "Schedule.DT_RowID"

I thank you in advanced!

This question has an accepted answers - jump to answer

Answers

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

    You can use idSrc to set the location for the ID data source. In this case you might use idSrc: 'Schedule.DT_RowId' (you could also use Schedule.id and drop the DT_RowId property if you don't need it for anything else.

    Allan

  • missenlinxmissenlinx Posts: 3Questions: 1Answers: 0

    allan, thanks so much pal. Keep up the solid work you are doing here.

  • missenlinxmissenlinx Posts: 3Questions: 1Answers: 0
    edited January 2015

    Hey Allan, is idSrc only available in the editor plugin? I am currently using the open source version. Any ideas how to do it in that particular version?

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

    Ah sorry - I had just assumed you were using Editor as that is where DT_RowId is most commonly used.

    For DataTables plain you would need to use createdRow and add the ID to the row.

    Allan

This discussion has been closed.