Wednesday, 25 April 2012

How to render partial view on each telerik Panel bar

The solution to render the partilal view on telerik panel bar or each panel bar contains one from is as follows. Here partial view contains form.
  @(
     Html.Telerik().PanelBar().Name("PanelBar").HtmlAttributes(new { style = "width: 300px;" }).BindTo(Model, mappings =>
      {
       mappings.For(binding => binding.ItemDataBound((item, manager) =>
       { 
         item.Text = manager.Name;
          item.Html = Html.Partial("Manager_Partial",manager).ToHtmlString();
          }));
         })
   )

No comments:

Post a Comment