<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GridCardView.aspx.cs" Inherits="GridCardView"%>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />

        <telerik:RadGrid ID="RadGrid2" runat="server" Skin="Outlook" 
            DataSourceID="ObjectDataSource1" AllowPaging="true"
            AllowAutomaticUpdates="true" AllowSorting="false">
            <MasterTableView CommandItemDisplay="Top" AllowSorting="true" 
                Width="100%" AutoGenerateColumns="false"
                DataSourceID="ObjectDataSource1"  DataKeyNames="OrderID">
                <Columns>
                    <telerik:GridEditCommandColumn>
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn DataField="OrderID" 
                        HeaderText="OrderIDTemplate" UniqueName="OrderID">
                    </telerik:GridBoundColumn>               
                     <telerik:GridBoundColumn DataField="CustomerID" 
                        HeaderText="CustomerIDTemplate" UniqueName="CustomerID">
                    </telerik:GridBoundColumn>
                </Columns>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                OrderID:    
                            </td>
                            <td>
                                <asp:Label ID="lblOrderId" runat="server" 
                                    Text='<%#Eval("OrderID") %>'></asp:Label>
                            </td>
                        </tr>                        
                        <tr>
                            <td>
                                CustomerID:
                            </td>
                            <td>
                                <asp:Label ID="Label1" runat="server" 
                                    Text='<%#Eval("CustomerID") %>'></asp:Label> 
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
                <EditItemTemplate>
                    <table>
                        <tr>
                            <td>
                                OrderID:    
                            </td>
                            <td>
                                <asp:TextBox ID="txtOrderId" runat="server" 
                                    Text='<%#Bind("OrderID") %>'></asp:TextBox>
                            </td>
                        </tr>                       
                         <tr>
                            <td>
                                CustomerID:
                            </td>
                            <td>                                
                                <asp:TextBox ID="TextBox3" runat="server" 
                                    Text='<%#Bind("CustomerID") %>'></asp:TextBox>                    
                            </td>
                        </tr>
                    </table>
                </EditItemTemplate>           
        </MasterTableView>
    </telerik:RadGrid>
    
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectCountMethod="SelectCount"
        SelectMethod="Select" TypeName="GuidTestCollection" 
         UpdateMethod="UpdateTable" DataObjectTypeName="Order">     
    </asp:ObjectDataSource>

    </form>
</body>
</html>
