I want to do list operations in the kendo grid.
Say I have below models,
public Class Product{
int id {get;set;}
List<Part> parts {get;set;}
}
public class part{
int id {get;set;}
string partName {get;set;}
}
Each product has the list of parts and each part has its properties described in the model above.
I would like to list all the products with their parts property as each kendo column in the kendo grid and have an issue in fetching the partName of the inner model by passing list of Product model to kendo grid.
Below is the way I am fetching inner model property to display for few column in the grid
columns.Bound(x => x.Parts.Find(x=>x.id=="1").partName)
please suggest if I am doing something wrong to fetch inner model properties.
Thanks in advance.
Model.SomeABCList.Find(x=>x.id="1").SomeValue
suggests you already have SomeValue as a property on your model right? Then what's the issue you can directly use it. Also, there is no harm in adding a property as it just acts as a data carrier. – Rahul Singh