madankarmukta

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • madankarmukta
    Participant

    Here is the code

    @{
    ViewBag.Title =

    “FetchData”;
    Layout =

    “~/Views/Shared/_Layout.cshtml”;
    }

    <

    h2>FetchData</h2>
    <

    html>
    <

    head><title>jqGrid Demo</title>
    <

    scriptsrc=”http://code.jquery.com/jquery-1.10.2.min.js”></script><scripttype=”text/javascript”> jQuery(document).ready(function () {
     

    try{
    jQuery(

    “#list”).jqGrid({
    url:

    ‘Account/FetchData/’,
    datatype:

    ‘xml’,
    mtype:

    ‘GET’,
    colNames: [

    ‘Inv No’, ‘Date’, ‘Amount’, ‘Tax’, ‘Total’, ‘Notes’],
    colModel: [{ name:

    ‘invid’, index: ‘invid’, width: 55 },
    { name:

    ‘invdate’, index: ‘invdate’, width: 90 },
    { name:

    ‘amount’, index: ‘amount’, width: 80, align: ‘right’ },
    { name:

    ‘tax’, index: ‘tax’, width: 80, align: ‘right’ },
    { name:

    ‘total’, index: ‘total’, width: 80, align: ‘right’ },
    { name:

    ‘note’, index: ‘note’, width: 150, sortable: false }],
    pager: jQuery(

    ‘#pager’),
    rowNum: 10,

    rowList: [10, 20, 30],

    sortname:

    ‘id’,
    sortorder:

    “desc”,
    viewrecords:

    true,
    imgpath:

    ‘themes/basic/images’,
    caption:

    ‘My first grid’
    })

    }

     

    catch (e) { };
    });

     

    </script>
    </

    head>
    <

    body><tableid=”list”class=”scroll”></table><divid=”pager”class=”scroll”style=”text-align: center;“></div>
    </

    body>
    </

    html>

     

    Try with removing the “try.. catch block”.. no grid is getting shown on the resultant page because of the exception “Object doesn’t support the property or the Method ‘jqGrid'”.

    Any help. 

    madankarmukta
    Participant

    Yeah, I have loaded them correctly with the correct file path.

    Still I am getting those error prompts.

    Regards.

Viewing 2 replies - 1 through 2 (of 2 total)

Stay connected with us in your favorite flavor!