Reputation: 166
I have this 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");
And in my model I create some column...
In particular
[Required]
[JqGridColumnFormatter(JqGridColumnPredefinedFormatters.Integer)]
public int AggregazioniDatiId { get; set; }
It is possible hide the above column in jqGrid by DataAnnotation?
I have tried with
[ScaffoldColumn(false)]
but in the colModel the column don't appear and then my jquery code does not work
var grid = $("#gridVisualizzazioni");
var selRowId = grid.jqGrid('getGridParam', 'selrow');
var celValue = grid.jqGrid ('getCell', selRowId, 'AggregazioniDatiId');
Thanks in advance.
Sara
Upvotes: 0
Views: 1422