Adding extra functionality to the createdRow callback
Adding extra functionality to the createdRow callback
jLinux
Posts: 981Questions: 73Answers: 75
I was playing around with a plugin that would need to interact with rows as they are created, but without interfering with the existing createdRow
callback if it exists.
Is there a way to add a 2nd createdRow callback somehow?
This discussion has been closed.
Answers
I notice the
aoRowCreatedCallback
inside the DT Settings object is an array with a function (if thecreatedRow
was set), so Im trying to add an anonymous function to it, heres the JSFiddle, but it doesn't seem to work.. But I'm close! I can feel it!The error is
But its odd, because I can see both have the
apply()
: http://d.pr/i/JLqRTried the following:
Which didnt work, but I didnt expect it to, was a total shot in the dark from looking through the DT JS, heh
This works, but im sure theres a better way, if not, COOL!
Got that from looking around the DT JS code, I found the line:
Then looked at the
_fnCallbackReg
function, and it was self-explanitory from thereNot sure what the
sName
is though?And is there a way to prioritize them?