簡體   English   中英

單擊提交按鈕后再次讀取數據表

[英]read datatable again after clicking the submit Button

我希望再次單擊dataTable或單擊“更新/提交”按鈕后從db重新加載數據。

我嘗試了這個

$('#ManageForms').dataTable().dataSource.read();

它似乎與kendoUI一起工作,但我猜數據表必須具有不同的過程。

如果要重新加載整個表,則可以使用fnReloadAjax() 它將轉到服務器,然后再次獲取所有內容。

例:

    var table = $('#example').dataTable();

  // Example call to load a new file
  table.fnReloadAjax( 'media/examples_support/json_source2.txt' );

  // Example call to reload from original file
  table.fnReloadAjax();

如果只想加載應該顯示的數據,則需要使用bServerSide參數,並考慮到過濾等因素,讓服務器回復您的請求。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM