America/US Samples
Europe Samples
Asia Samples

Gaia Ajax: Nested GridViews

Here we are showing how easily you can build nested gridviews. Though this functionality is quite advanced and highly efficient, there is not much coding required. Also note that we are using the XmlDataSource as the source for this example, using XPath in each of the nested level.

Customer 
Yellow Company Inc Show Orders
Blue Company Inc Show Orders

Markup (ASPX/.aspx)

   1:   
   2:  <gaia:GridView 
   3:      ID="zGvP" 
   4:      runat="server" 
   5:      AutoGenerateColumns="false" 
   6:      DataSourceID="XmlDataSource1" 
   7:      Width="100%">
   8:      <Columns>
   9:          <gaia:BoundField 
  10:              HeaderText="Customer" 
  11:              DataField="Name" 
  12:              ItemStyle-CssClass="customer-cell" />
  13:          <asp:TemplateField>
  14:              <ItemTemplate>
  15:                  <uc1:OrderGridView 
  16:                      ID="zUcC" 
  17:                      runat="server" 
  18:                      GridDataSource='<%# XPathSelect("Order") %>' />
  19:              </ItemTemplate>
  20:          </asp:TemplateField>
  21:      </Columns>
  22:  </gaia:GridView>
  23:      
  24:  <asp:XmlDataSource 
  25:      ID="XmlDataSource1" 
  26:      runat="server" 
  27:      DataFile="~/App_Data/customers-orderheaders-orderlines.xml">
  28:  </asp:XmlDataSource>
  29: