Button line Ajax aaDataArray

Button line Ajax aaDataArray

sampaloidsampaloid Posts: 3Questions: 1Answers: 0

Hi!..

I need help for add button in line ....

my js

t = $('#tableResult').DataTable( {
"ajax": {
"type": "POST",
"url": "BuscarLog",
"data": {
"data" : data,
"valorPesquisa" : valorPesquisa,
"ambiente" : ambiente
}
},
"columns": [
{ "data": "was" },
{ "data": "sessionId" },
{ "data": "data" },
{ "data": "arquivo"},
]
});

thks any help!

Answers

  • allanallan Posts: 61,821Questions: 1Answers: 10,127 Site admin

    I don't really understand I'm afraid. Do you want to include Buttons? If so, I'd suggest reading through the initialisation documentation in that link.

    Allan

  • sampaloidsampaloid Posts: 3Questions: 1Answers: 0

    I was a very superficial, sry...

    I have a function that returns a list of logs. I need add an button per line to call another function, to the Download File.

    My problem is in add this button with ajax object. I see columns.defaultContent but work with static data....

    Someone an example where the "default Content": "<button> Click </ button>" is dynamic content ?!

    :)

  • allanallan Posts: 61,821Questions: 1Answers: 10,127 Site admin

    columns.defaultContent will work just fine with Ajax loaded data. Example. If you are having issues with it, please link to a page showing the issue, per the forum rules, so it can be debugged.

    Allan

  • sampaloidsampaloid Posts: 3Questions: 1Answers: 0

    Excelente! ... its work!
    Very thanks!

    I forget add more one <th></th> to defaultContent...

    ehehhe

    Thks! (close case!)

This discussion has been closed.