I have the following panel bar. When I run this I get the following error at the line where it has subItem.Add().Text("CC").Content(
Compiler Error Message: CS0136: A local variable named 'item' cannot be declared in this scope because it would give a different meaning to 'item', which is already used in a 'parent or current' scope to denote something else
Here is the code I have:
@(Html.Telerik().PanelBar().Name("PanelBar").HtmlAttributes(new { style = "border-radius: 5px;"}).Items(item =>
{
item.Add().Text("A").Items(subItem =>
{
subItem.Add().Text("AA");
});
item.Add().Text("B").Items(subItem =>
{
subItem.Add().Text("BB");
});
item.Add().Text("C").Items(subItem =>
{
subItem.Add().Text("CC").Content(
@<text>
graph chart data
</text>).Action("...", ".");
subItem.Add().Text("CCC").Action("...", "...");
});
}
))