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

Issue With Grids and Lists in viewmodel

1 Answer 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Suzanne
Top achievements
Rank 1
Suzanne asked on 26 Jan 2016, 04:42 PM

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);
})
)

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 29 Jan 2016, 08:59 AM
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
Tags
Grid
Asked by
Suzanne
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or