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

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <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.
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" Skin="Metro" PageSize="7" AllowSorting="True"
            AllowPaging="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="True" AllowAutomaticUpdates="True"
            AutoGenerateColumns="False" OnItemDataBound="RadGrid1_ItemDataBound" CellSpacing="0" GridLines="None">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView CommandItemDisplay="Top" InsertItemDisplay="Top" DataSourceID="SqlDataSource1" DataKeyNames="OrderID">
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" ItemStyle-VerticalAlign="Top" HeaderStyle-Width="10px" />
                    <telerik:GridBoundColumn DataField="OrderID" UniqueName="contentId" HeaderText="ID"
                        HeaderStyle-Font-Bold="true" DataType="System.Int32" SortExpression="contentId"
                        ReadOnly="True" ItemStyle-VerticalAlign="Top" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ShipCountry" FilterControlAltText="Filter content column"
                        HeaderText="Inhalt" HeaderStyle-Font-Bold="true" SortExpression="content" UniqueName="content"
                        ItemStyle-VerticalAlign="Top">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings EditFormType="Template">
                    <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
                    <FormTemplate>
                        <div class="column1">
                            <p>Inhalt</p>
                        </div>
                        <div class="column2">
                            <telerik:RadEditor ID="RadEditor1" runat="server" Content='<%# Bind("ShipCountry") %>' Skin="Metro" Width="100%">
                                <Content></Content>
                                <Tools>
                                    <telerik:EditorToolGroup Tag="MainToolbar">
                                        <telerik:EditorTool Name="Cut"></telerik:EditorTool>
                                        <telerik:EditorTool Name="Copy"></telerik:EditorTool>
                                        <telerik:EditorTool Name="Paste" ShortCut="CTRL+V"></telerik:EditorTool>
                                        <telerik:EditorTool Name="PasteStrip" />
                                    </telerik:EditorToolGroup>
                                </Tools>
                            </telerik:RadEditor>
                            <br />
                        </div>
                        <div class="clear"></div>
                        <div class="column1"></div>
                        <div class="column2">
                            <div class="editbuttons">
                                <telerik:RadButton ID="btn_update" runat="server" OnClick="btn_update_Click"
                                    Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </telerik:RadButton>
                                <telerik:RadButton ID="btn_cancel" Text="Cancel" runat="server" CausesValidation="False"
                                    CommandName="Cancel">
                                </telerik:RadButton>
                            </div>
                        </div>
                        <div class="clear"></div>
                    </FormTemplate>
                </EditFormSettings>
                <CommandItemSettings AddNewRecordText="Neuer Eintrag" AddNewRecordImageUrl="/edit/img/add.png" 
                    RefreshImageUrl="/edit/img/refresh.png"></CommandItemSettings>
                <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
            </MasterTableView>
            <FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [OrderID], [OrderDate], [Freight], [ShipName], [ShipCountry] FROM [Orders]"></asp:SqlDataSource>
    </form>
</body>
</html>
