我現在對ror沒有任何經驗,所以可能有一些顯而易見的東西可能會丟失。我正在處理這個項目,就像這樣:app/views/index.haml有一個選項卡式菜單,我選擇菜單1,它是控制器在中央窗格中呈現它的視圖。從視圖中刪除代碼仍然呈現jqGrid
但是在app/view/menu1/index.haml的末尾有一個調用reder:grid_index。
_grid_index.haml以jqGrid開頭,這會導致表呈現。我不需要這張表 - 所以我從_grid_index.haml中刪除了所有內容。
但是當我在瀏覽器中刷新時,表格顯示。我試過重新啓動服務器,桌子不會消失。是的,我有保存該文件。
這是哪里哪里JQ網格渲染代碼:
<script type="text/javascript">
function gridReload(){
var name = $("#name").val();
var description = $("#description").val();
$("#financial_reports_grid").setGridParam({url:"grid_data/financial_reports/index?name="+name+"&description="+description,page:1}).trigger("reloadGrid");
}
</script>
<%= jqgrid("", "financial_reports_grid", "grid_data/financial_reports/index",
[
{ :field => "id", :label => "ID", :hidden => true },
{ :field => "financial_report_type", :label => "Report Format",:width => "100" },
{ :field => "name", :label => "Report Name", :width => "200" },
{ :field => "description", :label => "Description", :width => "400" },
{ :field => "show_financial_report_link", :label => "View", :width => "50", :align => "center" }
],
{ :ondblClickRow => "function(id){dblClickRow('financial_reports','show',id);}", :height => 350, :rownumWidth => 50, :gridview => true, :rowList => "[50,100,250]", :rowNum => 50, :viewsortcols => false, :rownumbers => false, :rows_per_page => 50, :add => false, :edit => false, :search => false, :error_handler => "afterSubmit", :direct_selection => false}.merge(grid_width_parameters)
) %>
顯示使用jqGrid渲染的部分/代碼,以及您正在刪除的內容。沒有具體細節的解決問題只不過是一種理論。 – jefflunt 2012-02-10 14:55:52