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

[Solved] Returning a specific view

0 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bill
Top achievements
Rank 2
Bill asked on 08 Nov 2011, 11:44 PM
I have a model which contains a customer record and can have multiple projects pertaining to that customer.
Html.Telerik().Grid<YeagerTechModel.Customer> 

I have two actions in the Controller. One that returns just the Customer records and the other one contains the
Customer record associated with its Projects.

The below syntax is for binding the data to the View.
IEnumerable<Customer> customerList = db.GetCustomers();                     
return View(new GridModel<Customer>                     {                         
Data = customerList                     });

I was planning to set up two separate views. One for each of the scenarios described above.

However, since the above syntax includes data for possible projects, do I need to make one View and hide the
Projects grid (hierarchial) or can I have two separate views (one with just the Customers and another hierarchial
one for the Customer and its associated Projects)?

According to the syntax that is used above, it seems that I can only use the one hierarchial view.
Tags
Grid
Asked by
Bill
Top achievements
Rank 2
Share this question
or