title: Jquery object array?
body: <p>I dont know how can explain, following code works</p>
  
  <pre><code>function DrawIrregularChartGrid() {
      $('#data_grid').datagrid({
          columns: [[{"field":"MeterID","title":"MeterID"},{"field":"ADateTime","title":"ADateTime"}]]
      });
  }
  </code></pre>
  
  <p>but this one does not work, there is no error message, grid is loading but col names are null. </p>
  
  <pre><code>function DrawIrregularChartGrid() {
      $('#data_grid').datagrid({
          columns: [GetGridColumnNames()]
      });
  }
  </code></pre>
  
  <p><code>GetGridColumnNames()</code> </p>
  
  <p>returns </p>
  
  <p><code>[{"field":"MeterID","title":"MeterID"},{"field":"ADateTime","title":"ADateTime"}]</code></p>
  
  <p><strong>GetGridColumnNames function</strong></p>
  
  <pre><code>function GetGridColumnNames() {
  
  var cols = [];
  var IrregularChartParams = InitializeChartParams();
  
  // parametreleri json stringe cevir...
  var chartParams = JSON.stringify(IrregularChartParams);
  
  $.ajax({
      type: "POST",
      url: app_base_url + 'Graph/GetGridColumnNames',
      contentType: 'application/json; charset=utf-8',
      data: chartParams,
      success: function (result) {
          $.each(result, function (index, value) {
              cols.push(result);
          });
      },
      error: function (xhr, ajaxOptions, thrownError) {
          alert(xhr.status);
          alert(thrownError);
      },
      beforeSend: function () {
  
      },
      complete: function () {
      }
  });
  return cols;
  }
  </code></pre>
  
  <p>dataGrid column property type is object array. How can assign <code>GetGridColumnNames</code> returning object to <code>columns</code> property.</p>