Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在管理页面上有 zii.widgets.grid.cgridview ,当我搜索一些记录并访问查看其中一个时,返回管理页面后结果被重置。我可以以某种方式拯救它们吗?
作为建议:
CGridView首先在您的视图中禁用 Ajax 更新:
CGridView
'ajaxUpdate' => false
现在,它通过GET请求发送数据。如果您保存当前的GET,则可以稍后使用结果。可通过以下方式访问:
GET
$_GET['YOUR_MODEL_NAME'];
如果您想在其他地方使用它,您可以从中获取值GET并将其放入CDBCriteria.
CDBCriteria
其他人可能会提供另一种方式。