This question is locked. New answers and comments are not allowed.
Ok so I have what is probably a overly stupid question but oh well here goes....
I am trying to model my grid after the example on the ajax editing demo. however when I attempt to run the code and commit an edit or delete I get an error that the view '_UpdateUser' or its master can't be found..... Which I of course understand means that it is looking for that view becuase that is the name of the action. I have also looked at the source code for the examples (included with the download) and When I look at AjaxEditingController.cs in the project the return View statements on the Add/edit/delete all get highlighted red (could not resolve view)
Is there some other "magic" going on in the background on the hosted demo site that makes it work? Not the method gets called and my database does get updated correctly its just having trouble redisplaying the grid....
just in case here is the controller or that method in the controller
I am trying to model my grid after the example on the ajax editing demo. however when I attempt to run the code and commit an edit or delete I get an error that the view '_UpdateUser' or its master can't be found..... Which I of course understand means that it is looking for that view becuase that is the name of the action. I have also looked at the source code for the examples (included with the download) and When I look at AjaxEditingController.cs in the project the return View statements on the Add/edit/delete all get highlighted red (could not resolve view)
Is there some other "magic" going on in the background on the hosted demo site that makes it work? Not the method gets called and my database does get updated correctly its just having trouble redisplaying the grid....
just in case here is the controller or that method in the controller
[Authorize(Roles = "Users")] [GridAction] [AcceptVerbs(HttpVerbs.Post)] public ActionResult _UpdateUser(int UserID) { var database = new Models.MWestEntities(); var foundStatus = (from myStatus in database.Users where myStatus.UserID == UserID select new StorySubmitter() { Email = myStatus.Email, FirstName = myStatus.FirstName, LastName = myStatus.LastName, PostalCode = myStatus.PostalCode, UserId = myStatus.UserID }).FirstOrDefault(); if (foundStatus == null) { //A customer with the specified id does not exist - redisplay the grid //GridRouteValues() is an extension method which returns the //route values defining the grid state - current page, sort expression, filter etc. return RedirectToAction("DisplayUsers", this.GridRouteValues()); } //Perform model binding (fill the customer properties and validate it). if (TryUpdateModel(foundStatus)) { var foundUser = (from myStatus in database.Users where myStatus.UserID == UserID select myStatus).FirstOrDefault(); foundUser.Email = foundStatus.Email; foundUser.FirstName = foundStatus.FirstName; foundUser.LastName = foundStatus.LastName; foundUser.PostalCode = foundStatus.PostalCode; //The model is valid - update the customer and redisplay the grid. //should just have to save since its in EF database.SaveChanges(); //GridRouteValues() is an extension method which returns the //route values defining the grid state - current page, sort expression, filter etc. } //The model is invalid - render the current view to show any validation errors return View(); }