Difference between Template and ClientTemplate

1 posts, 0 answers
  1. Brandon
    Brandon avatar
    1 posts
    Member since:
    Jun 2014

    Posted 03 Jun 2014 Link to this post

    I'm fairly new to programming and sometimes there is so much information out there but for some reason I'm having the hardest time understanding kendo templates. I'm trying to conditionally check if a value is true or false and then set my columns accordingly. I came across a Telerik article that states you can conditionally check using JavaScript:

    http://docs.telerik.com/kendo-ui/documentation/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/faq

    In my model I am using Razor and creating my columns similar to:

    @model IEnumerable<MvcApplication1.Models.Product>

    @(Html.Kendo().Grid(Model) // Bind the grid to the Model property of the view
    .Name("Grid")
    .Columns(columns =>
    {
    columns.Bound(p => p.ProductID); //Create a column bound to the "ProductID" property
    columns.Bound(p => p.ProductName); //Create a column bound to the "ProductName" property
    columns.Bound(p => p.UnitPrice); //Create a column bound to the "UnitPrice" property
    columns.Bound(p => p.UnitsInStock);//Create a column bound to the "UnitsInStock" property
    })
    .Pageable() //Enable paging
    )

    My question is what is the difference between the .Template and .ClientTemplate? Am I still able to use arbitrary JavaScript code in .Template?

    Any information would be greatly appreciated!
Back to Top