<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" Skin="Telerik" |
PageSize="3" AllowSorting="True" AllowPaging="True" DataSourceID="AccessDataSource1"> |
<MasterTableView DataKeyNames="CustomerID" Width="100%" HierarchyLoadMode="Client" |
Name="Customers" DataSourceID="AccessDataSource1"> |
<DetailTables> |
<telerik:GridTableView DataKeyNames="OrderID" Name="Orders" Width="100%" HierarchyLoadMode="Client" |
DataSourceID="AccessDataSource2"> |
<ParentTableRelation> |
<telerik:GridRelationFields DetailKeyField="CustomerID" MasterKeyField="CustomerID" /> |
</ParentTableRelation> |
<DetailTables> |
<telerik:GridTableView DataKeyNames="OrderID" Name="OrderDetails" Width="100%" DataSourceID="AccessDataSource3"> |
<ParentTableRelation> |
<telerik:GridRelationFields DetailKeyField="OrderID" MasterKeyField="OrderID" /> |
</ParentTableRelation> |
<Columns> |
<telerik:GridBoundColumn SortExpression="UnitPrice" HeaderText="Unit Price" HeaderButtonType="TextButton" |
DataField="UnitPrice"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn SortExpression="Quantity" HeaderText="Quantity" HeaderButtonType="TextButton" |
DataField="Quantity"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn SortExpression="Discount" HeaderText="Discount" HeaderButtonType="TextButton" |
DataField="Discount"> |
</telerik:GridBoundColumn> |
</Columns> |
</telerik:GridTableView> |
</DetailTables> |
<Columns> |
<telerik:GridBoundColumn SortExpression="OrderID" HeaderText="OrderID" HeaderButtonType="TextButton" |
DataField="OrderID"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn SortExpression="OrderDate" HeaderText="Date Ordered" HeaderButtonType="TextButton" |
DataField="OrderDate"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn SortExpression="Freight" HeaderText="Freight" HeaderButtonType="TextButton" |
DataField="Freight"> |
</telerik:GridBoundColumn> |
</Columns> |
</telerik:GridTableView> |
</DetailTables> |
<Columns> |
<telerik:GridBoundColumn SortExpression="CustomerID" HeaderText="CustomerID" HeaderButtonType="TextButton" |
DataField="CustomerID"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn SortExpression="ContactName" HeaderText="Contact Name" HeaderButtonType="TextButton" |
DataField="ContactName"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn SortExpression="CompanyName" HeaderText="Company" HeaderButtonType="TextButton" |
DataField="CompanyName"> |
</telerik:GridBoundColumn> |
</Columns> |
</MasterTableView> |
<ClientSettings AllowExpandCollapse="true"> |
<ClientEvents OnRowDblClick="RowDblClicked" /> |
</ClientSettings> |
</telerik:RadGrid> |
<asp:AccessDataSource ID="AccessDataSource1" DataFile="~/App_Data/Nwind.mdb" |
SelectCommand="SELECT * FROM Customers" runat="server"></asp:AccessDataSource> |
<asp:AccessDataSource ID="AccessDataSource2" DataFile="~/App_Data/Nwind.mdb" |
SelectCommand="SELECT * FROM Orders Where CustomerID = ?" runat="server"> |
<SelectParameters> |
<asp:SessionParameter Name="CustomerID" SessionField="CustomerID" Type="string" /> |
</SelectParameters> |
</asp:AccessDataSource> |
<asp:AccessDataSource ID="AccessDataSource3" DataFile="~/App_Data/Nwind.mdb" |
SelectCommand="SELECT * FROM [Order Details] where OrderID = ?" runat="server"> |
<SelectParameters> |
<asp:SessionParameter Name="OrderID" SessionField="OrderID" Type="Int32" /> |
</SelectParameters> |
</asp:AccessDataSource> |