<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>

<!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>
    <style type="text/css">
        .myStyle
        {
            vertical-align: middle !important;
        }
    </style>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
        function RowContextMenu(sender, eventArgs) {
            var menu = $find("<%=RadMenu1.ClientID %>");

            menu.show(eventArgs);

            eventArgs.cancelBubble = true;
            eventArgs.returnValue = false;

            if (eventArgs.stopPropagation) {
                eventArgs.stopPropagation();
                eventArgs.preventDefault();
            }
        }
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" DataSourceID="SqlDataSource1"
        GridLines="None" Width="700px" AllowPaging="True" OnPreRender="RadGrid1_PreRender">
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="OrderID" DataSourceID="SqlDataSource1">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Display="false" FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" FilterControlAltText="Filter OrderID column"
                    HeaderText="OrderID" ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" FilterControlAltText="Filter OrderDate column"
                    HeaderText="OrderDate" SortExpression="OrderDate" UniqueName="OrderDate">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Freight" DataType="System.Decimal" FilterControlAltText="Filter Freight column"
                    HeaderText="Freight" SortExpression="Freight" UniqueName="Freight">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ShipName" FilterControlAltText="Filter ShipName column"
                    HeaderText="ShipName" SortExpression="ShipName" UniqueName="ShipName">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
            <DetailTables>
                <telerik:GridTableView AutoGenerateColumns="false" DataKeyNames="OrderID" DataSourceID="SqlDataSource1">
                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                    <Columns>
                        <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" FilterControlAltText="Filter OrderID column"
                            HeaderText="OrderID" ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" FilterControlAltText="Filter OrderDate column"
                            HeaderText="OrderDate" SortExpression="OrderDate" UniqueName="OrderDate">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Freight" DataType="System.Decimal" FilterControlAltText="Filter Freight column"
                            HeaderText="Freight" SortExpression="Freight" UniqueName="Freight">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ShipName" FilterControlAltText="Filter ShipName column"
                            HeaderText="ShipName" SortExpression="ShipName" UniqueName="ShipName">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </telerik:GridTableView>
            </DetailTables>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [OrderID], [OrderDate], [Freight], [ShipName] FROM [Orders]">
    </asp:SqlDataSource>
    <telerik:RadContextMenu ID="RadMenu1" runat="server" EnableRoundedCorners="true"
        EnableShadows="true" OnItemClick="RadMenu1_ItemClick">
        <Items>
            <telerik:RadMenuItem Text="One" />
            <telerik:RadMenuItem Text="Two" />
            <telerik:RadMenuItem Text="Three" />
        </Items>
    </telerik:RadContextMenu>
    </form>
</body>
</html>
