This project is read-only.

Adding column at run time based on condition

Aug 21, 2013 at 6:53 PM
How can we add column at run time based on if condition.If condition is true,Column 'll be added.Otherwise It should be hidden.
Aug 22, 2013 at 11:16 AM
Hi, you can check condition in the Columns method:
        if (Model.ShowNumberColumn)
            columns.Add(o => o.Number)
Aug 27, 2013 at 11:55 AM
if (HttpContext.Current.Session["role"].ToString() == "Auditor")
i did the same but error comes.

Cannot convert lambda expression to type 'GridMvc.Columns.IGridColumn<Audit_Management.Models.ProjectLeadIssue>' because it is not a delegate type at
Aug 27, 2013 at 3:29 PM
I repeate your code and don't have any problems. Can you show all your grid layout/