Very Basic Question on Search
Very Basic Question on Search
CoriAnn
Posts: 6Questions: 0Answers: 0
Hi,
I keep coming back to this and searching through the forums and API docs but am not finding what I am looking for. I must be using the wrong terms in my head to find the information. I apologize for the basic question. I am sure this has been asked before.
We have an implementation that uses many many dataTables throughout the solution. Almost everything works very well for us. The one issue I am having is the user of the default Search box over the table and finding matches on data that we change on the fnRowCallback. There are many reasons we make changes, perhaps putting buttons or HTML and JavaScript interaction on a cell. The one that is getting us is the formatting of a UTC time string on the fnRowCallback.
I use $('td:eq(3)',nRow).html(formatUTC(aData[3])); and the data looks beautiful. However the search array that is created before the fnRowCallback does not have this new pretty string. I originally tried setting the .text, the .html, and the .value to see if this would help, but again, I thing it is preexisting data. We get the data once, put it in the UI, then expect all work to be done on the client. In a past release we sent it back to the server to deal with it, but when there are only 20 records in the table, that becomes a bit overkill.
Is it possible in the fnRowCallback to also alter the search array for searching at the same time? is there a better approach? Am I really off?
I keep coming back to this and searching through the forums and API docs but am not finding what I am looking for. I must be using the wrong terms in my head to find the information. I apologize for the basic question. I am sure this has been asked before.
We have an implementation that uses many many dataTables throughout the solution. Almost everything works very well for us. The one issue I am having is the user of the default Search box over the table and finding matches on data that we change on the fnRowCallback. There are many reasons we make changes, perhaps putting buttons or HTML and JavaScript interaction on a cell. The one that is getting us is the formatting of a UTC time string on the fnRowCallback.
I use $('td:eq(3)',nRow).html(formatUTC(aData[3])); and the data looks beautiful. However the search array that is created before the fnRowCallback does not have this new pretty string. I originally tried setting the .text, the .html, and the .value to see if this would help, but again, I thing it is preexisting data. We get the data once, put it in the UI, then expect all work to be done on the client. In a past release we sent it back to the server to deal with it, but when there are only 20 records in the table, that becomes a bit overkill.
Is it possible in the fnRowCallback to also alter the search array for searching at the same time? is there a better approach? Am I really off?
This discussion has been closed.