This question is locked. New answers and comments are not allowed.
hello, i have followed the demo EXACTLY and have no errors, but when the grid renders it is empty using this:
When I put in client template syntax it does render that correctly. I am nesting this grid within a telerik window and as a partial view.
Why doesnt this worK???
thanks !
@{ Html.Telerik().Grid(Model.Products) .Name("StoreProductsLayout2") .Columns(columns => { columns.Template( @<text> <div> <div> <button value="@{ Response.Write(item.StoreOwned ? "Added" : "Add Product"); }" class="_selectProduct" @{ Response.Write(item.StoreOwned ? "" : " onclick='productSelected'"); } /> <input type="hidden" value="@item.StoreProductId" name="spId" /> <input type="hidden" value="@item.StoreOwned.ToString().ToLower()" name="storeOwned" /> </div> <div class="dvimg gl-ProductImage"> <img src="../../Content/images/laptop.png" alt='<#= Name #>' class='@item.ClassStoreOwned _selectProduct' @{ Response.Write(item.StoreOwned ? "" : " onclick='productSelected'"); } /> </div> <div class="gl-ProductName"> <a class="_selectProduct" title="<#= Name #>" @{ Response.Write(item.StoreOwned ? "" : " onclick='productSelected'"); }>@item.Name</a> </div> <div class="gl-ProductPrice"> <p>@item.Price.ToString("C")</p> </div> </div> </text> ).Title("").Width(36).HtmlAttributes(new { style = "text-align:center" }); }) .DataBinding(dataBinding => dataBinding.Ajax().Select("GetStoreProducts", "StoreProduct")) .Pageable(x => x.Position(GridPagerPosition.Both)) .Sortable(x => x.OrderBy(z => z.Add(y => y.Name))) .Scrollable() .ClientEvents((Action<GridClientEventsBuilder>)ViewBag.OnGridLoad) .EnableCustomBinding(true) .Render(); }When I put in client template syntax it does render that correctly. I am nesting this grid within a telerik window and as a partial view.
Why doesnt this worK???
thanks !