title: How do I Iterate over IEnumerable dataSource in CreateChildControls GridView
body: <p>I can get the enumerator and the Current object but I don't know what the object contains so how do i iterate over a collection when you don't know the type and write out there values. Sample code would be great please</p>
  
  <pre><code>protected override int CreateChildControls(System.Collections.IEnumerable dataSource, bool dataBinding)
      {
          // Call base method and get number of rows
          int numRows = base.CreateChildControls(dataSource, dataBinding);
  
          IEnumerator enumerator = dataSource.GetEnumerator();
          while(enumerator.MoveNext()
          {
              object obj = enumerator.Currnet as object;   
          }
  
          return numRows;
      }
  }
  </code></pre>