This question is locked. New answers and comments are not allowed.
I'm fairly new to MVC, and could use some guidance.
I have a new project requirement to use a Hierarchy Grid and make both grids editable using AJAX with Popup form editing. We are using Entity Framework 4 as our ORM. Ideally, I want the grid to be in a partial that can be used on several pages.
Model is pretty basic: Event Locations and EventTypes both have their ID in the related Events table. One event can have only one location and type. The Event details, with related EventLocationName and EventTypeName should be displayed in the main grid. I made a GridViewModel that has the Event details with EventLocationName and EventTypeName.
The second grid should show the people working a specific event. The second grid also has dropdowns from related tables:
EventShift contains dropdowns for the employees and shifts available. EventShift contains the IDs from the related tables. I want to display the names not IDs in the grid, so I made a GridViewModel that has the EventShift details with EmployeeName and ShiftName.
After searching awhile, I found that Client Templates should handle the dropdowns. However, I'm getting a null reference every time I use the client templates. I must be doing something wrong passing the model to the partials or something.
Questions:
I've seen some posts concerning issues with Entity Framework 4 and Telerik Grid Editing, so I'm wondering if I'm beating my head over something that cant work. Any problems with EF4 and Telerik popup editing using partials?
How do I get the grid to show the EventLocationName instead of the ID when in display mode, and make it a dropdown when editing? I thought this was going to be pretty simple, but I must have missed something. Display Template and Edit Template should do the trick, but I cant get them to load the dropdowns and show the selected record before editing.
I would really appreciate any guidance you can offer on using EF4, Telerik MVC Grid, and a normalized database with lots of foreign keys. I've been beating my head for awhile, and need some help to get back on track.
I have a new project requirement to use a Hierarchy Grid and make both grids editable using AJAX with Popup form editing. We are using Entity Framework 4 as our ORM. Ideally, I want the grid to be in a partial that can be used on several pages.
Model is pretty basic: Event Locations and EventTypes both have their ID in the related Events table. One event can have only one location and type. The Event details, with related EventLocationName and EventTypeName should be displayed in the main grid. I made a GridViewModel that has the Event details with EventLocationName and EventTypeName.
The second grid should show the people working a specific event. The second grid also has dropdowns from related tables:
EventShift contains dropdowns for the employees and shifts available. EventShift contains the IDs from the related tables. I want to display the names not IDs in the grid, so I made a GridViewModel that has the EventShift details with EmployeeName and ShiftName.
After searching awhile, I found that Client Templates should handle the dropdowns. However, I'm getting a null reference every time I use the client templates. I must be doing something wrong passing the model to the partials or something.
Questions:
I've seen some posts concerning issues with Entity Framework 4 and Telerik Grid Editing, so I'm wondering if I'm beating my head over something that cant work. Any problems with EF4 and Telerik popup editing using partials?
How do I get the grid to show the EventLocationName instead of the ID when in display mode, and make it a dropdown when editing? I thought this was going to be pretty simple, but I must have missed something. Display Template and Edit Template should do the trick, but I cant get them to load the dropdowns and show the selected record before editing.
I would really appreciate any guidance you can offer on using EF4, Telerik MVC Grid, and a normalized database with lots of foreign keys. I've been beating my head for awhile, and need some help to get back on track.