I thought i would use the PanelBar because it looks good.
But can't find any real info on how to actually use it.
I need it to set a parameter in my model and then to submit the form/page.
I used to use a bunch of radio buttons like this:
And thought i would replace them with a nice panelbar something like this:
I found an action method on the panel bat, but it is unclear how to get it to simply action the default action. Also, don't know hot to bind or send the information to my model. Perhaps i could pass it to my controller as a variable or something.
But can't find any real info on how to actually use it.
I need it to set a parameter in my model and then to submit the form/page.
I used to use a bunch of radio buttons like this:
@foreach(var item in Model.Years)
{
<
div
class
=
"YearRadio"
>
<
label
>@item.Name</
label
>
@Html.RadioButtonFor(x => x.CurrentYear, item.Id.ToString(),new { onchange = "this.form.submit();" })
</
div
>
}
And thought i would replace them with a nice panelbar something like this:
@(Html.Kendo().PanelBar()
.Name("panelbar-Years")
.ExpandAll(true)
.Items(panelbar =>
{
panelbar.Add().Text("Years")
.Items(africa => {
foreach (var item in Model.Years)
{
africa.Add().Text(item.Title);
}
});
})
)