custom positioning

custom positioning

testowniktestownik Posts: 21Questions: 10Answers: 0

I have some confusion in regards to custom positioning of DT-specific elements. Currently, in init js section, I have something like this:

dom: 'lBfiptip'

so, prior to table, I have dropdown list (how many rows), set of buttons (column visibility groups), filter, info and pages. After the table, I have again, info and pages.

I understand, that changing order of these letters, changes order of displayed elements. But visually, the resulti is not what I expected. So here is my question.

If prior to data table, I create some 'custom table' - can I somehow assign individual DT elements to individual table cells?

[I don't exactly understand the manipulations, that are made in dom secion in other examples.]

Can I see some example, how this can be done?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,144Questions: 1Answers: 2,586
    Answer ✓

    Hi @testownik ,

    You can't assign DT elements (those list in -option dom) to cells, as they're the control elements, they need to be external to the table data. You can assign other elements to cells though, such as buttons or dropdowns, which you could use to call the DataTables API - these would be done in createdRow or columns.render (example here),

    Hope that helps,

    Cheers,

    Colin

This discussion has been closed.