Posted
on Jan 5, 2012
(permalink)
my code:
@(Html.Telerik().PanelBar()
.Name("PanelBar")
.Items(items =>
{
foreach (PermissionCategory pc in permissionCategories)
{
items.Add()
.Text(pc.CategoryName + " (" + pc.Permissions.Count.ToString() + ")")
.Content(
@<text>
@foreach (Permission p in pc.Permissions)
{
<input type="checkbox" name="SelectedPermissionIds" value="@p.Id"
@if (Model.SelectedPermissionIds != null && Model.SelectedPermissionIds.Contains(p.Id))
{
<text>checked="checked"</text>
}
/>
@p.Name
<br />
}
</text>);
}
}))
but the result is : all PanelBarItems have the same content, how to solve this? thanks!!!