0
How can I hide at runtime a column from Webgrid ?
For example, I want to hide the column Parametro
, it would be something like that:
grid.Column("Empresa", "Empresa"),
if(item.valor1 == X){
grid.Column("Parametro", "Parametro"),
}
grid.Column("Data", format: @<text>@item.DataInclusao.ToString("dd/MM/yyyy")</text>),
In this post: Hide a column from a Webgrid shows how to hide but not at runtime.