我有这个 jqgrid
var grid = new JqGridHelper<VisualisationModel>(
"gridVisualizzazioni",
caption: null,
dataType: JqGridDataTypes.Json,
methodType: JqGridMethodTypes.Post,
pager:true,
sortingName: "IndicatoreVisualizzazioniPk",
sortingOrder: JqGridSortingOrders.Asc,
url: Url.Action("LoadGrid", new {
indicatorePk = Model.IndicatorePk
}),
autoWidth: true,
viewRecords: true,
loadComplete:"SetCellBackColor");
在我的模型中,我创建了一些列...
尤其
[Required]
[JqGridColumnFormatter(JqGridColumnPredefinedFormatters.Integer)]
public int AggregazioniDatiId { get; set; }
可以通过DataAnnotation隐藏jqGrid中的上述列吗?
我试过了
[ScaffoldColumn(false)]
但是在 colModel 中,该列没有出现,然后我的 jquery 代码不起作用
var grid = $("#gridVisualizzazioni");
var selRowId = grid.jqGrid('getGridParam', 'selrow');
var celValue = grid.jqGrid ('getCell', selRowId, 'AggregazioniDatiId');
提前致谢。
萨拉