getting called on subsequent pages
getting called on subsequent pages
bimargulies
Posts: 13Questions: 0Answers: 0
I put data into my dataTable with fnAddData. I have an aoColumnDefs that sets up an fnRender. I'm operating on the assumption that fnRender has to return plain text, not markup.
I want a button in this column, so fnRender returns dummy text, and then I fix things up. I fix things up by using jquery to iterate over the relevant cells. Of course, only the first page of cells are there the first time through. When someone pages to the second page, no such luck.
I thought of using jquery's live function to catch the arriving cells and 'buttonize' them, but I need to access the original row data structure to set up the handler on the button. I could keep all the rows in some variable for the page, but I'd at least need to know the row index.
If I was wrong about the fnRender functions return in the first place, I could use an attribute to put the row index.
I have this feeling that I'm missing something simple.
I want a button in this column, so fnRender returns dummy text, and then I fix things up. I fix things up by using jquery to iterate over the relevant cells. Of course, only the first page of cells are there the first time through. When someone pages to the second page, no such luck.
I thought of using jquery's live function to catch the arriving cells and 'buttonize' them, but I need to access the original row data structure to set up the handler on the button. I could keep all the rows in some variable for the page, but I'd at least need to know the row index.
If I was wrong about the fnRender functions return in the first place, I could use an attribute to put the row index.
I have this feeling that I'm missing something simple.
This discussion has been closed.