title: dynamic columnDef in ng-Grid
body: <p>I want to assign ng-grid columns name dynamically after value returned from database, but issue is that it get initialized before data return from ajax, and i am not able to recall gridOption    so it showing balnk, so please help me that how can we construct a column name by ajax return   value.  </p>
  
  <pre><code>$scope.gridOptions =
          {
              data: 'data.Values',
              columnDefs:
              [
                      { field: "ID", displayName: "Record Id" },
                      { field: "Value", displayName: $scope.ColumnName, cellFilter: cellfilterType },                       
          ],
  
          };
  </code></pre>
  
  <p>where <code>$scope.ColumnName</code> coming from below line...</p>
  
  <pre><code> RecordService.getRecords().then(function (data) {  
    $scope.ColumnName=  data.something;
   }  
  </code></pre>
  
  <p>Thanks</p>