This is a migrated thread and some comments may be shown as answers.

[Solved] MVC Telerik Panel bar group by issue

0 Answers 11 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Abhi
Top achievements
Rank 1
Abhi asked on 27 Dec 2012, 10:39 AM
I have an employee details class and I want  to bind it to a telerik panel.
the collection class should be grouped by first name and last name and the contents should be displayed as panel items.
please see the below classes

    public class EmployeeyDetailModel {
        public IList<EmployeeyModel > EmployeeySummaryModel { get; set; }
}
 
    public class EmployeeyModel {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public DateTime PayDate { get; set; }
        public Decimal Amount { get; set; }
        public string PayTypeDescription { get; set; }
    }

the output should look like the attached screen shot.

Now I am able to display the panels using below code without grouping.
<%: Html.Telerik().PanelBar()
                        .Name("EmployeePanelBar")
                        .BindTo(Model.EmployeeyModel , mappings => mappings.For<EmployeeyModel>(binding => binding
                        .ItemDataBound((item, category) =>
                                            {
                                                item.Text = category.PayDate+ category.Amount;
                                            })))
%>


Somebody please help  me.

Thanks
Abhi

Tags
PanelBar
Asked by
Abhi
Top achievements
Rank 1
Share this question
or