Button doesn't work
Button doesn't work
peterbelove
Posts: 27Questions: 8Answers: 0
I just followed this example page, but somehow the click button doesn't work.
https://datatables.net/examples/ajax/null_data_source.html
http://live.datatables.net/cilirupe/1/
Can anyone please help point out what I am missing here?
Thanks!
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Two things:
First since you are using objects with
columns.data
you will want to usecolumns.render
to display the button for thedisplay
operation as described in the Orthogonal data docs.Next you will need to access the row data using object notation not array notation for the alert message. See the updated example:
http://live.datatables.net/cilirupe/1/edit
Kevin
sorry - I don't see the update in your link. Do you mind checking? thx
Oops, it didn't save properly. Here is the example:
http://live.datatables.net/jobovako/1/edit
Kevin
great - that works perfectly.
One more question - do you know how to set the button height or the padding of the button. After I added the button the height of each row is larger so that it displays less rows.
thanks!
FYI - tried below css, but not working.
.button {font-size:12px; padding: 0px 4px; !important;}
http://live.datatables.net/jobovako/3/
thanks,
the
.button
selector is looking for a class but you don't have the classnamebutton
assigned. Remove the leading period for the selector to find allbutton
elements. Better would be to assign a classname and change the selector to match, like this:http://live.datatables.net/zewapona/1/edit
Kevin
thanks a lot. really appreciate.