This project is read-only.

How to hide Columns of Grid.mvc on basis of role.

Apr 7, 2014 at 8:29 AM
I want to hide columns of Grid and will show on the basis of various roles.
How can i do this. Please help me out.
Apr 8, 2014 at 6:37 AM
HOW TO HIDE COLUMNS OF GRID USING JAVASCRIPT.. PLEASE DO LET ME KNOW ASAP.
Apr 8, 2014 at 8:11 AM
Please do tell me ....
Apr 16, 2014 at 3:45 AM
Hi,

Try the follwing:
public class MyModel
{
         public IEnumerable<MyGridItem> GridItems {get;set;}

         public bool ShowEditColumn {get;set;}
} 

view:

@Html.Grid(Model.GridItems).Columns( columns => {
          if( Model.ShowEditColumn)
          {
            columns.Add(o => o.Property)
                    .Titled("Property");
           }
})
Jul 8, 2014 at 1:52 PM
Edited Jul 8, 2014 at 2:34 PM
removed