Reload table on ajax.reload()

Reload table on ajax.reload()

shatrughanshatrughan Posts: 87Questions: 16Answers: 0

I have a table of over 5000 records with 40+ columns, half of them are remained hidden very often. Loading the same at once at the beginning causes it to be quite slower. The records are often needed year-wise. Therefore I have a dropdown of values populated with last 7 years. I am new to datatable editor and unable to do the records loaded in accordance with the year selected from the dropdown list. Please help me.. how to accomplish it .

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,947
    Answer ✓

    Assuming you are using the ajax option you can use the ajax.data option to send extra parameters to the server which the server script can use as part of the DB query. Look at the example using a function. This will allow the custom parameters to be changed each time ajax.reload() is used.

    Kevin

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    @kthorngren Thanks. Issue Solved.

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    But, while I create or update a record, the same is not reflected to be done, however it creates and updates internally. It seems that Ajax is not returning proper json. Couln't figure out how to resolve it. Please help...

  • kthorngrenkthorngren Posts: 21,309Questions: 26Answers: 4,947
    Answer ✓

    Looks like you have a discussion on this subject in this thread. Please continue the discussion there.

    Kevin

This discussion has been closed.