This question is locked. New answers and comments are not allowed.
Environment:
VS2010, MVC3, Razor
Situation:
I have a telerik grid with a single column that is templated out and built with a table.
Removing header:
I have no need for a header on my grid and I need to remove it but I am not having any luck on how to do this.
Binding to a model client side:
I am currently using column.Template() but I need to use column.ClientTemplate() which does not exist, it only exists in the column.bound().clienttemplate() method. How would I allow my whole model to be bound so I can call all of my fields without individually binding them? I have a model of type "ClaimModel" that holds all of my data. I tried column.Bound<ClaimModel>().ClientTemplate() but that did not work either.
Source Code:
VS2010, MVC3, Razor
Situation:
I have a telerik grid with a single column that is templated out and built with a table.
Removing header:
I have no need for a header on my grid and I need to remove it but I am not having any luck on how to do this.
Binding to a model client side:
I am currently using column.Template() but I need to use column.ClientTemplate() which does not exist, it only exists in the column.bound().clienttemplate() method. How would I allow my whole model to be bound so I can call all of my fields without individually binding them? I have a model of type "ClaimModel" that holds all of my data. I tried column.Bound<ClaimModel>().ClientTemplate() but that did not work either.
Source Code:
@{ Html.Telerik().Grid(Model) .Name("Grid") .ToolBar(tool => tool.Template(@<text><div style="text-align: right"> @Html.CheckBox("checkAll") Per Page: @Html.Telerik().DropDownList().Name("pagecount").BindTo(new SelectList(Model, "MemberName", "MemberName")) Sort By: @Html.Telerik().DropDownList().Name("dropDownList").BindTo(new SelectList(Model, "MemberName", "MemberName"))</div></text>)) .Columns(columns => { columns.Template(@<text> <table style="width: 900;"> <tr> <td rowspan="2" width="36" valign="bottom" align="center" style="border-right-width: 0">@Html.CheckBox("export",false) </td> <td rowspan="2" valign="middle"> </td> <td align="left" colspan="2"> <span class="nameSeparator">@item.MemberName</span> <br /> <span class="gridTitle">MemberID# </span><span class="gridField">@item.MemberID</span> </td> <td align="center" colspan="2"> <span class="gridTitle">Date of Service</span><br /> <span class="gridField">@String.Format("{0:d}", item.DOSStart) - @String.Format("{0:d}", item.DOSEnd)</span> </td> <td align="right" colspan="2"> <span class="nameSeparator">@item.PatientName </span> <br /> <span class="gridTitle">PatientID# </span><span class="gridField">@item.MemberID</span> </td> </tr> <tr> <td align="right" class="gridTitle"> Payer Claim#<br /> Payment Date </td> <td class="gridField"> @item.PayerClaimNumber<br /> @String.Format("{0:d}", item.PaymentDate) </td> <td align="right" class="gridTitle"> Payment<br /> Charge </td> <td class="gridField"> @String.Format("{0:c}", item.PaymentAmount)<br /> @String.Format("{0:c}", item.ChargeAmount) </td> <td align="right" class="gridTitle"> Denial Type<br /> Adj. Codes </td> <td class="gridField"> @item.DenialType <br /> @item.AdjustmentCodes </td> </tr> </table></text>); } ) .Pageable(pager => pager.Position(GridPagerPosition.Bottom).PageSize(int.Parse(ViewData["pageSize"].ToString())).Enabled(true)) .DataBinding(dataBinding => dataBinding.Ajax().Select("_Sort", "Grid")) .Sortable(sorting => sorting.OrderBy(order => { switch(ViewData["sort"].ToString()) { case "Patient": order.Add(o => o.PatientName); break; case "Member": order.Add(o => o.MemberName); break; case "DateOfService": order.Add(o => o.DOSStart); break; default: order.Add(o => o.PatientName); break; } })).Render();}