0
我正在使用bs_grid來顯示數據庫中的數據。我想隱藏默認過濾器按鈕,因爲我不使用它,但似乎很難找到任何以前的問題或某種跡象。如何從bs_grid中隱藏/刪除過濾器按鈕
任何幫助表示讚賞。
編輯:jquery插件使用單個div來呈現所有網格至極是基於一些初始設置計算
HTML代碼:
<div id="cliente_grid"></div>
JS代碼:
$(function() {
$("#cliente_grid").bs_grid({
ajaxFetchDataURL: "ajax/ajax_fetch_cliente_data.php",
row_primary_key: "ID_anagrafica_clienti",
columns: [
{field: "ID_anagrafica_clienti", header: "Code", visible: "no"},
{field: "Codice_Fiscale", header: "Codice Fiscale"},
{field: "Cognome", header: "Cognome"},
{field: "Nome", header: "Nome"},
{field: "Sesso", header: "Sesso"},
{field: "Data_nascita", header: "Data nascita"},
{field: "Comune_nascita", header: "Comune nascita", visible: "no"},
{field: "Pv_nascita", header: "Pv nascita", visible: "no"}
],
sorting: [
{sortingName: "Code", field: "ID_anagrafica_clienti", order: "none"},
{sortingName: "Codice Fiscale", field: "Codice_Fiscale", order: "ascending"},
{sortingName: "Cognome", field: "Cognome", order: "ascending"},
{sortingName: "Nome", field: "Nome", order: "ascending"},
{sortingName: "Sesso", field: "Sesso", order: "ascending"},
{sortingName: "Data nascita", field: "Data_nascita", order: "none"},
{sortingName: "Comune nascita", field: "Comune_nascita", order: "ascending"},
{sortingName: "Pv nascita", field: "Pv_nascita", order: "ascending"}
],
/*
filterOptions: {
filters: [
{
filterName: "Codice_Fiscale", "filterType": "text", field: "Codice_Fiscale", filterLabel: "Codice Fiscale",
excluded_operators: ["in", "not_in"],
filter_interface: [
{
filter_element: "input",
filter_element_attributes: {"type": "text"}
}
]
},
{
filterName: "Cognome", "filterType": "text",field: "Cognome", filterLabel: "Cognome",
excluded_operators: ["equal", "not_equal", "less", "less_or_equal", "greater", "greater_or_equal"],
filter_interface: [
{
filter_element: "input",
filter_element_attributes: {type: "text"}
}
],
},
{
filterName: "Gender", "filterType": "number", "numberType": "integer", field: "lk_genders_id", filterLabel: "Gender",
excluded_operators: ["equal", "not_equal", "less", "less_or_equal", "greater", "greater_or_equal"],
filter_interface: [
{
filter_element: "input",
filter_element_attributes: {type: "checkbox"}
}
],
lookup_values: [
{lk_option: "Male", lk_value: "1"},
{lk_option: "Female", lk_value: "2", lk_selected: "yes"}
]
},
{
filterName: "DateUpdated", "filterType": "date", field: "date_updated", filterLabel: "Datetime updated",
excluded_operators: ["in", "not_in"],
filter_interface: [
{
filter_element: "input",
filter_element_attributes: {
type: "text",
title: "Set the date and time using format: dd/mm/yyyy hh:mm:ss"
},
filter_widget: "datetimepicker",
filter_widget_properties: {
dateFormat: "dd/mm/yy",
timeFormat: "HH:mm:ss",
changeMonth: true,
changeYear: true,
showSecond: true
}
}
],
validate_dateformat: ["DD/MM/YYYY HH:mm:ss"],
filter_value_conversion: {
function_name: "local_datetime_to_UTC_timestamp",
args: [
{"filter_value": "yes"},
{"value": "DD/MM/YYYY HH:mm:ss"}
]
}
}
]
}
*/
});
});
從代碼中可以看出,沒有任何跡象表明,某些財產或任何其他事物,並且在矽統上並沒有這麼好(我搜查了很長時間但從未建立過,也許我錯了?)
顯示一些代碼你試過了嗎?讚賞 –
如果你按照鏈接,你會看到沒有太多的嘗試......這是問題。我找不到任何東西來嘗試:( – Alex75