Issue With Grids and Lists in viewmodel

2 posts, 0 answers
  1. Travis
    Travis avatar
    4 posts
    Member since:
    Mar 2015

    Posted 26 Jan Link to this post

    I am trying to bind a grid in the editor template that contains List<> and have the ability to add and edit this list I need to do this in multiple places so Any idea would help a lot.

    Model:

    public int AgencyId { get; set; }
    public string AgencyName { get; set; }
    public int AgencyNumber { get; set; }
    public string TIN { get; set; }
    public bool Incorp { get; set; }
    public string Affiliat { get; set; }
    public IList<AgencyLocation> AgencyLocationCollection 

     Cshtml

    <individual Field edits>

    Need a grid here that will show all the associate locations and allow add and edit

      @(Html.Kendo().Grid<AgencyLocation>()
    .Name("Grid")
    .EnableCustomBinding(false)
    .BindTo(Model.AgencyLocationCollection)
    .Columns(columns =>
    {
    columns.Bound(m => m.AddressShortString);
    columns.Bound(m => m.AgencyLocationId);
    })
    )

     

     

     

     

  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 29 Jan Link to this post

    Hi Travis,

    Please check the following resources:

    http://www.kendoui.com/support/code-library/grid-popup-editing-navigation-property-collection-with-nested-grid

    http://ask.programmershare.com/1413_19732659/

    Regards,
    Dimo
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top