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

[Solved] Bring Grid inside Panel Bar, where panel bar and Grid data are bound to Model

0 Answers 33 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.
Archana
Top achievements
Rank 1
Archana asked on 23 Dec 2010, 10:57 AM
I need to bring Grid inside Panel Bar where the data are bound to model(Dynamic). I saw implementation of BindingToModel. In the same way i need to bring Grid indide that bar. My Model data goes like this

Model which am accepting
-----------------------------
public class OpmModel{
public List<OpmAnalysis> lstOpmAnalysis { get; set; }
public List<OpmCalculation> lstOpmCalculation { get; set; }
}

My UserControl Implementation
-----------------------------
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<OpmModel>" %>

 

<%= Html.Telerik().PanelBar()
        .Name("PanelBar")
        .ExpandMode((PanelBarExpandMode)Enum.Parse(typeof(PanelBarExpandMode), PanelBarExpandMode.Single.ToString()))
        .BindTo(Model.lstOpmAnalysis, mappings =>
        {
            mappings.For<OpmAnalysis>(binding => binding
                    .ItemDataBound((item, category) =>
                    {
                        item.Text = "Break Point #" + category.BreakPointNumber + " : "  + category.BreakPointDescription;
                    })
                     .Children(category => objGen.GetBreakPointCalculation("Breakpoint"+category.BreakPointNumber)));

            mappings.For<OpmCalculation>(binding => binding.ItemDataBound((item, product) =>
                    {item.Text = product.Column1.ToString() + " :       " + product.Column2.ToString();}));
//Instead of the above mapping i.e. mapping for OpmCalculation i want Grid over there
        })
%>


Please help implementing this

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