title: How to load remote data using Kendo UI Grid?
body: <p>Hello guys I just want to ask how can I load data from my mysql table using a Kendo Ui grid.
  I am using CodeIgniter as well. But I don't know how to integrate it with my code. Here's my sample code.</p>
  
  <p>In my controller I have something like this. For testing i put my database query in a model which is not correct.</p>
  
  <pre><code>CONTROLLER
  
  public function displayListItem(){
          $sqlSelectAll = "select * from items";
          $resultSelectAll = $this-&gt;db-&gt;query($sqlSelectAll);
          echo json_encode($resultSelectAll-&gt;row_array());
  }
  
  JAVASCRIPT PART
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $("#grid").kendoGrid({
          dataSource: {
              type: "odata",
              transport: {
                  read: "&lt;?php echo site_url('item_controller/displayListItem'); ?&gt;"
              },
              schema: {
                  model: {
                      fields: {
                          itemid: { type: "number" },
                          itemcode: { type: "string" },
                          itemname: { type: "string" },
                          itemdesc: { type: "string" },
                          itembrand: { type: "string" },
                          itemunit: { type: "number" },
                          salescatname: { type: "string" },
                          entrydate: { type: "date" }
                      }
                  }
              },
              pageSize: 20,
              serverPaging: true,
              serverFiltering: true,
              serverSorting: true
          },
          height: 430,
          filterable: true,
          sortable: true,
          pageable: true,
          columns: [{
                  field:"itemid",
                  filterable: false
              },
              "itemcode",
              {
                  field: "itemname",
                  title: "Item Name",
                  width: 120,
              }, {
                  field: "itemdesc",
                  title: "Description",
                  width: 260
              }, {
                  field: "itembrand",
                  title: "Brand",
                  width: 150
              }, {
                  field: "itemunit",
                  title: "Unit",
                  width: 150
              }, {
                  field: "salescatname",
                  title: "Category",
                  width: 150
              }, {
                  field: "entrydate",
                  title: "Entry Date",
                  width: 150
              }
          ]
      });
  });
  </code></pre>
  
  <p></p>
  
  <p>TO ACCESS THE TABLE</p>
  
  <pre><code>&lt;div id="grid"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Here's my table structure:</p>
  
  <pre><code>mysql&gt; desc items;
  +--------------+------------------+------+-----+-------------------+----------------+
  | Field        | Type             | Null | Key | Default           | Extra          |
  +--------------+------------------+------+-----+-------------------+----------------+
  | itemid       | int(10) unsigned | NO   | PRI | NULL              | auto_increment |
  | itemcode     | varchar(100)     | YES  | MUL | NULL              |                |
  | itemname     | varchar(500)     | YES  | MUL | NULL              |                |
  | itemdesc     | varchar(512)     | YES  | MUL | NULL              |                |
  | itembrand    | varchar(128)     | YES  | MUL | NULL              |                |
  | itemunit     | varchar(45)      | YES  | MUL | NULL              |                |
  | salescatid   | int(10) unsigned | YES  | MUL | NULL              |                |
  | salescatname | varchar(128)     | YES  | MUL | NULL              |                |
  | entrydate    | timestamp        | YES  | MUL | CURRENT_TIMESTAMP |                |
  +--------------+------------------+------+-----+-------------------+----------------+
  9 rows in set (0.04 sec)
  </code></pre>
  
  <p>I have no output with my table. I don't know where's my error. Please help me guys. Thanks.</p>