0
我想使用jquery隐藏下拉列表选择中的iggrid列。 我试过以下,但没有工作。在下拉列表中隐藏iggrid列
var hideTheColumn = $("#cntStatusID").val();
$("#lifeInsuranceGrid").delegate("iggridhidingcolumnhiding", function (evt, ui) {
if (hideTheColumn == 3) {
$("#lifeInsuranceGrid").igGridHiding("showColumn", columnsGrid);
} else {
$("#lifeInsuranceGrid").igGridHiding("hideColumn", columnsGrid);
}
});
和我的格子的定义是:
...
columns: [{
headerText: headerTextValues[0],
key: "insuranceID",
hidden: true
}, {
headerText: headerTextValues[1],
key: "amount",
width: 175,
template: "<a href='Home/ManageLifeInsuranceEditor?liId=${insuranceID}&command=edit' class='editLifeDialog'>${amount}</a>"
}, {
headerText: headerTextValues[2],
key: "Benefname",
width: 200,
template: "<a href='Home/ManageLifeInsuranceEditor?liId=${insuranceID}&command=edit' class='editLifeDialog'>${Benefname}</a>"
}, {
headerText: headerTextValues[3],
key: "Altername",
width: 150,
template: "<a href='Home/ManageLifeInsuranceEditor?liId=${insuranceID}&command=edit' class='editLifeDialog'>${Altername}</a>"
}, {
headerText: headerTextValues[4],
key: "willMakerTypeDesc",
hidden: true,
width: 150,
template: "<a href='Home/ManageLifeInsuranceEditor?liId=${insuranceID}&command=edit' class='editLifeDialog'>${willMakerTypeDesc}</a>"
},
],
确定。谢谢 。 – Soussou