close jquery tab causes search

close jquery tab causes search

jamieb22jamieb22 Posts: 10Questions: 7Answers: 0

HI

We are using Datatables with server side processing enabled as per below..

"bProcessing": true,
"sAjaxSource": "fetchtabledata.do",
"bDeferRender": true,
"bServerSide": true,

We have a data table shown in a jquery tab. When double clicking on an item in the data table, our UI is programmed to open a new jquery tab and switch to it. The tab contains the detail on the item. When closing the jquery tab it returns to the search tab. When the close tab event occurs, datatables redraws itself. However, if the user has scrolled several page down, datatables appears to the sAjaxSource url to fetch data again. This process is time consuming and distracting for the user. Is there any way to prevent datatables from searching again? The datatable is already rendered in the search tab, so is it really necessary to refetch the data? How to prevent this?

https:/server.local/fetchtabledata.do?sEcho=15&iColumns=10&sColumns=,,,,,,,,,&iDisplayStart=10896&iDisplayLength=180&mDataProp_0=0&bSortable_0=false&mDataProp_1=1&bSortable_1=false&mDataProp_2=2&bSortable_2=true&mDataProp_3=3&bSortable_3=true&mDataProp_4=4&bSortable_4=true&mDataProp_5=5&bSortable_5=true&mDataProp_6=6&bSortable_6=true&mDataProp_7=7&bSortable_7=true&mDataProp_8=8&bSortable_8=true&mDataProp_9=9&bSortable_9=true&iSortingCols=1

Much appreciate

Jamie

Answers

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954

    What are you doing in the close tab event handler?

    Datatables will only redraw if requested to do so using something like draw or ajax.reload. Or it will happen when paging, sorting, etc happens. Please post a link to your page or a test case replicating the issue so we can help debug.

    Kevin

Sign In or Register to comment.