Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1845
MVC - GridColumn Template doesn't work if set in code behind
posted

Does the GridColumn.Template work if set in the controller rather than the view?  I'm trying a pretty straightforward example, but it doesn't seem to have any affect on how the cells are rendered.  Is there any reason it would fail silently?

Parents
  • 6279
    Suggested Answer
    posted

    Hi Josh,

    This is what I've tried in the sample I'm attaching to this reply:

    gridModel.Columns = new List<GridColumn>();
    gridModel.Columns.Add(new GridColumn("Project Id", "ProjectId", "number", "100px"));
    gridModel.Columns[0].Template = "Project ID: ${ProjectId}";
     
    and it works perfectly :)



    Please have a look at it and let me know if you can reproduce the issue you're facing with it.

    Thanks & cheers! 

Reply Children