Hi all,
I wanted to create a hirachy grid with telerik controles. I am new to telerik. I use MVVM architechure.
I can passe one modle to view and display content.
but in hirachy view I dont know how to deal with 2 models beacuse by default only one model can be passe to view .
how to solve this. please help
how to pass 2 models to view + mvc4 asp.net
Page 1 of 13 Replies - 2012 Views - Last Post: 28 July 2012 - 10:24 AM
Replies To: how to pass 2 models to view + mvc4 asp.net
#2
Re: how to pass 2 models to view + mvc4 asp.net
Posted 27 July 2012 - 02:52 PM
You could create a class that includes both classes you want to pass to the view and use that as your model
#3
Re: how to pass 2 models to view + mvc4 asp.net
Posted 28 July 2012 - 08:06 AM
2 class in one class. can you show me an example code for that
thanks in advance
thanks in advance
#4
Re: how to pass 2 models to view + mvc4 asp.net
Posted 28 July 2012 - 10:24 AM
Just the same as you'd make any class, you're just using your classes as properties instead of string, int or some other premade type.
Here's a link to a tutorial on using ViewModels.
public class SomeClass
{
public AClass classOne {get;set;}
public BClass classTwo {get;set;}
}
Here's a link to a tutorial on using ViewModels.
This post has been edited by Nakor: 28 July 2012 - 10:33 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|