title: How to bind xml elements to the GridView using the xmlDataSourse?
body: <p>I have a service returning xmlData in a string format:</p>
  
  <pre><code>    &lt;CourseSearchDataSet xmlns="http:/www.tempuri.org/CourseSearchDataSet.xsd"&gt;
       &lt;Course&gt;
         &lt;CourseId&gt;9e980791&lt;/CourseId&gt;
         &lt;CourseName&gt;Library and Information Solutions&lt;/CourseName&gt;
         &lt;CourseDesc&gt;Overview of Library&lt;/CourseDesc&gt;
       &lt;/Course&gt;
       &lt;Course&gt;
         &lt;CourseId&gt;f3e59e56&lt;/CourseId&gt;
         &lt;CourseName&gt;Power Link Intro&lt;/CourseName&gt;
         &lt;CourseDesc&gt;This course&lt;/CourseDesc&gt;
       &lt;/Course&gt;
  &lt;/CourseSearchDataSet&gt;
  </code></pre>
  
  <p>At runtime I am trying to bind this data to GridView using the xmlDataSource.</p>
  
  <p>I have defined a grid and dataSource at the design time:</p>
  
  <pre><code>&lt;asp:GridView runat="server" ID="grdCourses" XPath="Course/"&gt;
              &lt;Columns&gt;
                  &lt;asp:TemplateField HeaderText="Id"&gt;
                      &lt;ItemTemplate&gt;
                            &lt;%# XPath("CourseId") %&gt;
                      &lt;/ItemTemplate&gt;
                  &lt;/asp:TemplateField&gt;
              &lt;/Columns&gt;
          &lt;/asp:GridView&gt;
      &lt;asp:XmlDataSource runat="server" ID="xmlDataSource"&gt;&lt;/asp:XmlDataSource&gt;
  </code></pre>
  
  <p>At design time I am assigning the data to the xmlDataSource and assigning xmlDataSource to grid:</p>
  
  <pre><code> xmlDataSource.EnableCaching = false;
          xmlDataSource.DataFile =  courseList;
          grdCourses.DataSourceID = "xmlDataSource";
  </code></pre>
  
  <p>("courseList" is a string holding service result).</p>
  
  <p>The grid has been binded to the xmldDataSource but its not displaying the CourseId (the fields defined in templateField, no error, just blank columns.</p>
  
  <p>I am referring to this tutorial: <a href="http://goo.gl/mUHkYm" rel="nofollow">http://goo.gl/mUHkYm</a>
  I don't want to use DATASET since its messy and requires many events to be handled manually.</p>
  
  <p>Any help would be highly appreciated.</p>
  
  <p>Thanks in advance.
  Vishal</p>