Author Topic: Error pqgrid is not an object  (Read 2880 times)

grumpy

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 1
    • View Profile
Error pqgrid is not an object
« on: September 17, 2014, 11:26:28 pm »
I'm just getting started.
I have a grid that displays my data, but I am trying to refine it.

I derived this code from  a jsfiddle http://jsfiddle.net/paramquery/n337xLf7/  posted by Administrator in answer to another question. This is what I tried ;

<script type= 'text/javascript'>

  $(function(){     
     var  myColModel    = [
         {title: "Category", width: 100, dataType: "String"},
         {title: "Sub", width: 200, dataType: "string"},
         {title: "Level", width: 30, dataType: "String", align: "Center"},
         {title: "Comments", width: 350, dataType: "String", align: "left"}
         ];
     var  myDataModel = [["Cabling","CAT 5"," "," ","1","1","107","2330"],
         ["Certification","Nortel","C","","13","0","109","2330"],
         ["KEY","Avaya"," "," ","3","9","111","2330"],
         ["KEY","NEC"," "," ","3","10","112","2330"],   
         ["KEY","Nortel"," "," ","3","8","108","2330"],
         ["KEY","Panasonic"," "," ","3","33","106","2330"],
         ["VoIP","Nortel"," "," ","4","14","110","2330"],
         ["","","","","","",""],   
         ["","","","","","",""],        
         ["","","","","","",""],
         ];
      var  myGrid =  $ ('#grid_array').pqgrid ({ height:  252, width: 746,
            dataModel:  { data: myDataModel},
            colModel: myColModel,
            title: 'pgGrid 8',
            resizable: true,
            draggable: false,
            ColumnBorders: true,
            numbercell: false ,
            sortable: true,
            editable: true,
            selectionModel: { type: 'row', mode: 'single'},
                                                     scrollModel: { horizontal: false}            
   });
});       
</script>
</head>
<!--In the body tag define the div tag/tags which act as placeholders for the grid.-->
<body>
<div id="grid_array"></div>   
</Body>
</html>

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Error pqgrid is not an object
« Reply #1 on: September 18, 2014, 11:42:43 pm »
It's pqGrid, not pqgrid.