Telerik Forums
UI for ASP.NET MVC Forum
1 answer
259 views

HI

There have a problem about PanelBar.ExpandMode(PanelBarExpandMode.Single) : 

When user expand one item then other expanded item will collapse automatically (THIS IS OK),
but when user click the EXPANDED ITEM, that item will not collapse.

How can I collapse the EXPANDED ITEM while PanelBar.ExpandMode(PanelBarExpandMode.Single) ?

Best regards

Chris

 

 

 

Neli
Telerik team
 answered on 02 Mar 2018
2 answers
289 views

In my _Layout view, I am using a splitter and have panes for Navigation and Main content.    In my navigation pane, I am opening a _Navigation partial view with a panelbar where I have my menu items.   When I click on a menu item, it is returning the partial view into the Navigation pane in the _Layout.   How Can I direct this to the main pane in the _Layout view?

I see why this is happening but now sure how to modify it.

Thanks

_Layout

@(Html.Kendo().Splitter()
.Name("mainSplitter")
.Panes(panes =>
{
panes.Add()
.Size("150px")
.Content(
@<text>
@Html.Partial("_Navigation")
</text>);
panes.Add().Content(@<text>
<section id="main">  -----When I click on a menu item in _Navigation, I want the Partial View to show here
     @RenderBody()
</section>
</text>);
}))

 

_Navigation

@(Html.Kendo().PanelBar().Name("panelbar")
.SelectedIndex(0)
.ExpandMode(PanelBarExpandMode.Single)
.Items(items =>
{
items.Add().Text("Refunds").Items(corp =>
{
corp.Add().Text("Refund Summary").Content(@<text> @Html.Partial("_refundGrid") </text>);
    });
}))

<script>
$("#panelbar").kendoPanelBar({
animation: {
// fade-out closing items over 1000 milliseconds
collapse: {
duration: 100,
effects: "fadeOut"
},
// fade-in and expand opening items over 500 milliseconds
expand: {
duration: 500,
effects: "expandVertical fadeIn"
}


}
});
</script>

 

 

Lori
Top achievements
Rank 1
 answered on 30 Jan 2018
7 answers
241 views
Is it possible to use the PanelBarBuilder to accomplish this? I see that there are various BindTo methods available.

Or..

Can I create PanelBarItem with trees embedded? It seems as though only text is possible.

I'm not even sure where to begin. Can anyone please provide an example to get me started?
Dimitar
Telerik team
 answered on 23 Jan 2018
1 answer
667 views

Hi

I have a PanelBar within a Kendo Grid Custom Edit Popup. 

I'd like to place a button within the popup that once clicked, allows all the PanelBar sections to be opened.

Does anyone know if this is possible?

Thanks.

Ivan Danchev
Telerik team
 answered on 09 Jan 2018
3 answers
937 views

Hi,

I am trying to use Panelbar as a Side bar navigation (something like Outlook).

I have the Model this way.

public class NavbarMainMenuModel
{
    public int Dept_id { get; set; }
    public int Seq_no { get; set; }
    public string Dept_name { get; set; }
    public List<NavbarMenuItem> Items { get; set; }
}
public class NavbarMenuItem
{
    public int Menu_item_id { get; set; }
    public int Seq_no { get; set; }
    public int Dept_id { get; set; }
    public string MenuName { get; set; }
}

 

Now, I want to load the Panel bar with this data.

Currently, I have this code and it only display the top level items but not the children.

 

<div id="responsive-panel" style="width:200px;">
    @(Html.Kendo().PanelBar()
            .Name("panelbar")
            .ExpandAll(false)
            .ExpandMode(PanelBarExpandMode.Multiple)
            .DataTextField("Dept_name")
            .DataSource(ds=>ds
                .Read(read=>read.Action("GetMainMenuItems","Home"))
                )
            .Events(e=>e
            .Select("panelbarselected")
            )
    )
</div>

 

How do I get the Main list and sub items display on the PanelBar?

Also, i need to display them in the right sequence (if possible).

 

Thanks,

Arun

 

 

Arun Perregattur
Top achievements
Rank 1
 answered on 10 Oct 2017
5 answers
229 views

Is the a way when the PanelBar is expanded it just overlays existing Html instead of pushing it down?

 

Thanks

 

 

Greg
Top achievements
Rank 1
 answered on 02 May 2017
1 answer
203 views

Hello everyone, I need to fill panel bar content with partial views. My current code is

 

@(Html.Kendo().PanelBar()
        .Name("reportFilters")
        .ExpandMode(PanelBarExpandMode.Multiple)
        .ExpandAll(true)
        .Animation(true)
        .Items(panelbar =>
        {
            foreach (IFilterCategory filterCateg in Model)
            {
                panelbar.Add()
                 .Text(filterCateg.DisplayName)
            .Content(@<text><div style="padding-top:5px;padding-left:5px;padding-right:5px">
@Html.Action(filterCateg.Action, filterCateg.Controller, new { filterCateg = filterCateg })</div></text>);
            }
        }
    )
)

 

and after reading the following post 

http://www.telerik.com/forums/what-is-the-syntax-to-open-a-mvc-partial-page-inside-a-pannel-bar#hmqmhkbB-kyThT8J06ygng

i tried to achieve client side rendering by using LoadContentFrom and .Action() without success. The best try was hitting the controller but the object filterCateg is null.

Thanks in advance.

Nencho
Telerik team
 answered on 03 Apr 2017
14 answers
413 views

So far all of the Telerik components I've used thus far have been fairly simple.  Irritating to get it to look the way I want, but when it comes to binding to data, it's been pretty simple.

But this is my first time in using the PanelBar, and I'm confused beyond all belief.  I have a database with Topic information such as Title, Description, Created by, etc...  Some of these are marked as Active, and others are marked as In-Active.  I'd like the panel bar to have two panels, one each for Active and In-Active, and upon opening each of them, display a list of Titles for the appropriate type.

So I have a controller action returning an IEnumerable<Topic> and tried using the DataSource Read action, but they just all get listed in the panel bar.  I've tried coding two separate panels, and trying LoadContentFrom, but this is showing my topic information as JSON, and they're all grouped together. 

I've seen examples using Model Binding, but I'm not passing the data in as a Model.

So how in the holy heck do I get this thing to do what I want it to do?

My class is pretty simple:

public class TopicBank
    {
        public TopicBank();
 
        public bool Active { get; set; }
        public string CreatedBy { get; set; }
        public DateTime CreatedOn { get; set; }
        public string Description { get; set; }
        public string FormData { get; set; }
        public Guid ID { get; set; }
        public DateTime LastModified { get; set; }
        public string LastModifiedBy { get; set; }
        public string Title { get; set; }
    }

 

And my controller is even more simple:

[HttpGet]
[ActionName("GetTopicList")]
public ActionResult GetTopicList()
{
    var hold = WebApiHelper.CallGetAPI<List<TopicBank>>($"{_baseURL}api/Transcend/GetTopicList");
    return Json(hold, JsonRequestBehavior.AllowGet);
}

 

What do I need to do to get this thing to display how I want it to?

Ivan Danchev
Telerik team
 answered on 17 Mar 2017
1 answer
83 views

Take the following PanelBar:

@(Html.Kendo().PanelBar()
       .Name("topicList")
       .BindTo(Model, mappings =>
       {
           mappings.For<DropDownTopicList>(b => b.ItemDataBound((item, category) =>{ item.Text = category.Category; }).Children(category => category.Topics));
           mappings.For<TopicBank>(b => b.ItemDataBound((item, topic) =>{ item.Id = topic.ID.ToString(); item.Text = topic.Title + " - " + topic.Description; }));
       })
       .Events(ev => ev.Select("pbSelect"))
   )

 

How do I get the Id of the selected Item? 

Joe
Top achievements
Rank 1
 answered on 09 Mar 2017
1 answer
56 views

Kendo version: 2015.1.429

We got an IndexOutOfRangeException error as attached.  Please advise.

Thanks

 

 

Ivan Danchev
Telerik team
 answered on 01 Mar 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?