Click here to Skip to main content
15,887,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using UsinJqgridMVC.ServiceReference1;
using System.ServiceModel;
using System.Text;
using ClassObjects;
using Lib.Web.Mvc.JQuery.JqGrid;



namespace UsinJqgridMVC.Controllers
{
public class HomeController : Controller
{
//
// GET: /Home/

public ActionResult Index()
{
return View();
}
public ActionResult Insert()
{
Service1Client objclient = new Service1Client();
return View();

}

public string create(string UserName, string Password, string Country, string Email)
{
Class1 obj = new Class1();
obj.UserName = UserName;
obj.Password = Password;
obj.Country = Country;
obj.Email = Email;
Service1Client objcreate = new Service1Client();
return objcreate.create(obj);

}
public ActionResult Griddisp()
{
return View();

}


[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Products(JqGridRequest request, Class1 viewModel)
{

Service1Client obj = new Service1Client();
JqGridResponse response = new JqGridResponse();
List<class1> listobj = new List<class1>();
var m = obj.display();
listobj = m.ToList();

foreach (Class1 user in listobj)
{
response.Records.Add(new JqGridRecord(Convert.ToString(user.UserId), new List<object>()
{
user.UserId,
user.UserName,
user.Password,
user.Country,
user.Email,

}));
}

return new JqGridJsonResult() { Data = response };
}

}

}


JqGridRequest i got error the type namespace name could not found.
Posted
Comments
2011999 26-Oct-12 5:26am    
are you missing a using directive or an assembly referebce

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900