title: Display data into an EXTJS Grid Panel
body: <p>I am trying to make a gridview and I am able to do that successfully using hardcoded data.</p>
  
  <pre><code>var store = Ext.create('Ext.data.Store', {
          storeId: 'myData',
          //url: 'GridViewController',
          fields: [
              { name: 'Q1', type: 'int' },
              { name: 'Q2', type: 'int' },
              { name: 'Q3', type: 'int' },
              { name: 'Q4', type: 'int' },
              { name: 'Q5', type: 'int' },
              { name: 'Improvements', type: 'string' },
              { name: 'Comments', type: 'string'}],
          data: { 'items': [
          { "Q1": "1", "Q2": "2", "Q3": "4", "Q4": "4", "Q5": "5", "Improvements": "Wut Is Up", "Comments": "Nothing" },
          { "Q1": "1", "Q2": "1", "Q3": "3", "Q4": "4", "Q5": "5", "Improvements": "Wut Is Up1", "Comments": "Nothing13"}]
          },
          proxy: {
              type: 'memory',
              //url: 'GridViewController'
              reader: {
                  type: 'json',
                  root: 'items'
              }
          }
      });
  
      //store.load();   
      this.grid = Ext.create('Ext.grid.Panel', {
          title: 'GridView App',
          store: Ext.data.StoreManager.lookup('myData'),
          columns: [
          //{ id: 'id', header: 'ID', width: 30,
          //    sortable: true, dataIndex: 'id'
          //},
          {header: 'Q1', width: 100, sortable: true, dataIndex: 'Q1' },
          { header: 'Q2', width: 100, sortable: true, dataIndex: 'Q2' },
          { header: 'Q3', width: 100, sortable: true, dataIndex: 'Q3' },
          { header: 'Q4', width: 100, sortable: true, dataIndex: 'Q4' },
          { header: 'Improvements', width: 200, sortable: true, dataIndex: 'Improvements' },
          { header: 'Comments', width: 200, sortable: true, dataIndex: 'Comments' }
      ],
          stripeRows: true,
          //height:250,
          width: 800,
          renderTo: Ext.getBody()
      });
  </code></pre>
  
  <p>This works fine... But now I want to get data from sql db and use URL... like url:GridViewController (like in the code)...
  here's my contoller</p>
  
  <pre><code>public void GridViewController()
      {
  
          Response.Write("Survey Completed!");
          SqlConnection conn = DBTools.GetDBConnection("ApplicationServices2");
          string sqlquery = "Select Q1, Q2, Q3, Q4, Improvements, Comments FROM MyTable";
          SqlCommand cmd = new SqlCommand(sqlquery, conn);
  
          using (SqlDataReader reader = cmd.ExecuteReader())
          {
              while (reader.Read())
                  //json.Add(reader.GetInt32(0), reader.GetString(1));
              reader.Close();
          }
  
          //cmd.Connection = conn;
          conn.Open();
          //cmd.ExecuteNonQuery();
          conn.Close();
  
      }
  </code></pre>
  
  <p>I am lost as to how to implement this. Please help. Any Input will be highly appreciated.</p>