How to get different controls in Table

How to get different controls in Table

charblcharbl Posts: 1Questions: 0Answers: 0
edited March 2009 in General
How would I get different HTML controls into the output for a dymanic table? Can I even do that?

Lets say I wanted to add a button into the generated table ... any thoughts?

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    You sure can do this, and there are many ways to do it. The application that you are using it for will prescribe the best way of doing it...

    1. The easiest way is simply to include your HTML button in the data you pass to DataTables to create the table.
    2. Another option is to use fnRender ( http://datatables.net/usage#fnRender ) to create a rendering funciton for each table.
    3. Yet another option is to inject the required HTML into the table get getting the required node ( http://datatables.net/api#fnGetNodes ) and altering the DOM as you would with any other piece of Javascript :-)

    Are any of these options workable for you?
    Allan
This discussion has been closed.