Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
JqGrid method call URL not working
14/09/2009
10:38
Avatar
rams_innovative
Member
Members
Forum Posts: 3
Member Since:
14/09/2009
sp_UserOfflineSmall Offline

Hi,

I am newbie to JqGrid. I am using Asp.net MVC with JqGrid. I have a details page which navigated from the index page.

 <%= Html.ActionLink(item.MoMID.ToString(), "Details", new { id = item.MoMID })%>

Here is the details method in the controller.

  public ActionResult Details(int id)

        {

            var db = new DashBoard.Context.DB();

            

            return View(db.MoMs.SingleOrDefault(m => m.MoMID == id));

        }

I have a Jqgrid declared in my details.aspx page as follows.

        $(document).ready(

        function() {

            

            jQuery("#gridMins").jqGrid({

                url: 'Minutes',

                datatype: 'json',

                mtype: 'GET',

                colNames: ['SNo', 'Description'],

                colModel: [

                              { name: 'SNo', index: 'SNo', width: 50 },

                              { name: 'Description', index: 'Description', width: 600 }

                            ],

                sortname: 'SNo',

                sortorder: 'asc',

                viewrecords: true,

                caption: 'Minutes'

            });

 });

Here is the table element

<table id="gridMins"></table>

Minutes method for the jqGrid is as follows.

 public ActionResult Minutes(string sidx, string sord, int page, int rows)

        {

            DashBoard.Context.DB db = new DashBoard.Context.DB();

            

            var jsonData = new

            {

                total = 1, 

                page = page,

                records = db.MoMMinutes.ToList<MoMMinute>().Count,

                rows = (

                  from mom in db.MoMMinutes

                  select new

                  {

                      i = mom.SNo,

                      cell = new string[] {mom.SNo.ToString()

                          , mom.Description.ToString()}

                  }).ToArray()

            };


            return Json(jsonData);

        }

When I debugged the data, the call is going to details(int id) method, how ever call is not going to Minutes method corresponded to jqGrid. Can somebody assist me asap?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
49 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information