Treeview listing giving error

1 posts, 0 answers
  1. Abdul Batin
    Abdul Batin avatar
    1 posts
    Member since:
    Aug 2012

    Posted 28 Aug 2012 Link to this post

    @

     

    using Kendo.Mvc.UI

     

    @

     

    using Kendo.Mvc.UI.Fluent

     

    @

     

    using SpineWMS.Domain

     

    @model

     

    IList<SpineMenu>

     

     

    @(Html.Kendo().TreeView()

    .Name(

     

    "Outline")

     

    .BindTo(Model, (

     

    NavigationBindingFactory<TreeViewItem> mappings) =>

     

    {

    mappings.For<

     

    SpineMenu>(binding => binding

     

    .ItemDataBound((item, layer) =>

    {

    item.Text = layer.MenuText.ToString();

     

     

    }

    ));

     

    }

     

    )

    )

     
    Why above code is giving error "Object reference not set to an instance of an object."

    in _Layout.cshtml

     

    <

     

     

    li>@{this.Html.RenderPartial("~/Views/Menu/Index.cshtml");}</li>

     

Back to Top