This question is locked. New answers and comments are not allowed.
I am using panelbar for employee details. I have a list containing Employee data.
Code:-
<% Html.Telerik().PanelBar()
.Name("PanelBar")
.HtmlAttributes(new { style = "width: 800px; float: left; margin-bottom: 30px;" })
.ExpandMode(PanelBarExpandMode.Single)
.SelectedIndex(0)
.Items(items =>
{
foreach (Employee i in EmployeeList)
{
items.Add().Text(i.Name).Content(() =>
{
%>
<div>
<strong><%= i.EmpCode%></strong><br/>
<%= i.Designtn%>
</div>
<%
});
}
}).Render(); %>
Problem is-
Panelbar items shows all the employee names bt content of each item is Details i.e. EmpCode and Designtn of Last employee.
How do I solve this???
Code:-
<% Html.Telerik().PanelBar()
.Name("PanelBar")
.HtmlAttributes(new { style = "width: 800px; float: left; margin-bottom: 30px;" })
.ExpandMode(PanelBarExpandMode.Single)
.SelectedIndex(0)
.Items(items =>
{
foreach (Employee i in EmployeeList)
{
items.Add().Text(i.Name).Content(() =>
{
%>
<div>
<strong><%= i.EmpCode%></strong><br/>
<%= i.Designtn%>
</div>
<%
});
}
}).Render(); %>
Problem is-
Panelbar items shows all the employee names bt content of each item is Details i.e. EmpCode and Designtn of Last employee.
How do I solve this???