2011-06-24 18 views
1

Hallo mench。yiiGridView問題

我有一個yiiGridView問題女巫我不知道如何正確。

所以,我有CGridView很好地初始化,我需要$(tableId).yiiGridView.update(tableId,設置),以重新加載我的數據網格與新的數據。

任何人都可以(請!)張貼一些例子如何實現這一點。

如果需要,我也可以發送我的代碼,這樣任何可以解決此問題的人都可以更好地瞭解我犯的錯誤。

在此先感謝(d)。

+0

找了很多資料來更新您的網格,它還挺急的! – metaforce

回答

2

如果你想用JavaScript處理程序使用下面的代碼

jQuery.fn.yiigridview.update('yourGridId'); 

可以在文件

jquery.yiigridview.js 

    /** 
    * Performs an AJAX-based update of the grid view contents. 
    * @param id string the ID of the grid view container 
    * @param options map the AJAX request options (see jQuery.ajax API manual). By default, 
    * the URL to be requested is the one that generates the current content of the grid view. 
    */ 
    $.fn.yiiGridView.update = function(id, options) 
+0

感謝狗!我愛你 :* – metaforce