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

Multiple grids and other controls from the same viewmodel.

2 Answers 153 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 05 Dec 2012, 06:16 PM
Hi, I'm new to Kendo UI and I'm working on ASP.NET MVC 4. I have 3 models, for example Category, Product and Status, products have a reference to one category and one status. I need to display in a view (using Razor) data from multiple models, like for example Category.Name and Category.DateCreated on the top of page, and then a grid with all products that have StatusId = 1, and then another grid with all products that have StatusId = 2 (there are only two status). So, I have created a view model class for a Category, it includes all properties from Category model, but also has 2 lists for Products with Status = 1 and Status = 2; but I don't know how to populate these grids, how to pass data to them. I looked for a similiar question in the forum but didn't find any, if someone could help me with an example, I'd be thankful! (Please let me know if more info is needed, or if it's not well explained the case)

2 Answers, 1 is accepted

Sort by
0
Luis
Top achievements
Rank 1
answered on 05 Dec 2012, 06:19 PM
Maybe the title is not so descriptive, I forgot to change it :)
0
Atanas Korchev
Telerik team
answered on 07 Dec 2012, 07:39 AM
Hello,

Unfortunately it is not very clear what the problem is right now. Could you please clarify? You could paste here how your models look like and what is the code you have tried so far.

By the way you could try using the MVC wrappers of Kendo UI. They make using Kendo UI in ASP.NET MVC applications a lot easier. You can check the documentation of the ASP.NET MVC grid wrapper here.
 
Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Luis
Top achievements
Rank 1
Answers by
Luis
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or