Click here to Skip to main content
15,914,111 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hi,
I am doing one mvc3 application with jqgrid.In that am using $("#list").jqgrid({}) like that,.But it displays an error.
$("list").jqgrid() is not a function error.
can any one suggest me how to solve this error.
JavaScript
$(document).ready(function () {
            $("#list").jqGrid({
                url: '/Home/GridData/',
                datatype: 'json',
                mtype: 'GET',
                colNames: ['Id', 'Votes', 'Title'],
                colModel: [
          { name: 'Id', index: 'Id', width: 40, align: 'left' },
          { name: 'Votes', index: 'Votes', width: 40, align: 'left' },
          { name: 'Title', index: 'Title', width: 400, align: 'left'}],
                pager: jQuery('#pager'),
                rowNum: 10,
                rowList: [5, 10, 20, 50],
                sortname: 'Id',
                sortorder: "desc",
                viewrecords: true,
                imgpath: '/scripts/themes/coffee/images',
                caption: 'My first grid'
            });
        });
Posted
Updated 8-May-12 1:36am
v2

1 solution

Be sure to add all the jquery references and try as:
JavaScript
$('#list').jqGrid({});
 
Share this answer
 

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