Pregunta

Question 1 :

I am trying implementing JQgrid in MVC, for that in .jqgrid url , i have as url: '/Personalize/GetAccountHeads', Where GetAccountHeads() is a Method in PersonalizeController.cs as.,

        [HttpPost]
        [Authorize]
        public JsonResult GetAccountHeads() {                
            List<ACHeadEntry> acHeadEntries = new List<ACHeadEntry>();
            //Some code here to calculate acHeadEntires.
            return Json(acHeadEntries, JsonRequestBehavior.AllowGet);
        }

But this method too does not be called. Where I went wrong?

While trying to find that, I have downloaded the demo project .,

Question 2 :

http://code.haacked.com/mvc-1.0/JQueryGridDemo.zip And tried to execute it. But I am getting the following error.enter image description here

The output window shows ..

C:\Users\developer\AppData\Local\Temp\Rar$DIa0.562\GridDemo\GridDemo.csproj : error : The project file could not be loaded. Could not find a part of the path 'C:\Users\developer\AppData\Local\Temp\Rar$DIa0.562\GridDemo\GridDemo.csproj'. C:\Users\developer\AppData\Local\Temp\Rar$DIa0.562\GridDemo\GridDemo.csproj

C:\Users\developer\AppData\Local\Temp\Rar$DIa0.562\DynamicQuery\DynamicQuery.csproj : error : The project file could not be loaded. Could not find a part of the path 'C:\Users\developer\AppData\Local\Temp\Rar$DIa0.562\DynamicQuery\DynamicQuery.csproj'. C:\Users\developer\AppData\Local\Temp\Rar$DIa0.562\DynamicQuery\DynamicQuery.csproj

Actually many times, It is happening this way. Why I am getting this error.

Also, I am trying implementing JQgrid in MVC, for that in .jqgrid url , i have as url: '/Personalize/GetAccountHeads', Where GetAccountHeads() is a Method in PersonalizeController.cs as.,

        [HttpPost]
        [Authorize]
        public JsonResult GetAccountHeads() {                
            List<ACHeadEntry> acHeadEntries = new List<ACHeadEntry>();
            //Some code here to calculate acHeadEntires.
            return Json(acHeadEntries, JsonRequestBehavior.AllowGet);
        }

But this method too does not be called. Where I went wrong?

¿Fue útil?

Solución

The reason is because you use really old demo. One can see on the screen that you use Microsoft Visual Studio 2012 which has no support for MVC 1.0. You need first convert MVC 1.0 to MVC 2.0 with the old tool and then convert MVC 2.0 to MVC 3.0 with another tool.

I would recommend you to start better with the demo from the answer which is also relatively old. It uses MVC 2.0, but using the second conversion tool MvcAppConverter.exe you can convert it to MVC 3.0. One small step (converting of unneeded using System.Xml.Serialization; line in Models\HaackOverflowEF.Designer.cs) one have to do manually.

UPDATED: I verified that the demo which you referenced (http://code.haacked.com/mvc-1.0/JQueryGridDemo.zip) is already in ASP.NET 2.0 so it's enough to use only one conversion tool (downloadable from here)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top