<%@ Page Language="c#" CodeFile="Default1.aspx.cs" Inherits="_Default" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.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="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None"
        AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
        AllowPaging="True" AutoGenerateColumns="False" Width="600px" Skin="Windows7"
        ShowStatusBar="True" AllowSorting="True" AllowFilteringByColumn="true">
        <%-- RC-8/10/11 --%>
        <ExportSettings HideStructureColumns="true" OpenInNewWindow="true" ExportOnlyData="true"
            IgnorePaging="true" />
        <%-- RC-8/10/11 END --%>
        <ItemStyle Height="30px" />
        <AlternatingItemStyle Height="30px" />
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="CustomerID" DataSourceID="SqlDataSource1"
            CommandItemDisplay="Top" Width="600px" HorizontalAlign="NotSet" EditMode="EditForms"
            GridLines="None" AllowFilteringByColumn="true">
            <%-- RC-8/10/11 --%>
            <CommandItemSettings ShowExportToPdfButton="true" ShowExportToWordButton="true" ShowExportToExcelButton="true"
                ShowExportToCsvButton="true" />
            <%-- RC-8/10/11 END --%>
            <%-- RC-11/7/11 --%>
            <EditFormSettings EditFormType="Template">
                <EditColumn UniqueName="EditCommandColumn1" />
                <PopUpSettings ScrollBars="None" />
                <FormTemplate>
                    <asp:PlaceHolder ID="phEditableControls" runat="server">
                        <table cellspacing="5" style="margin-left: 10px">
                            <tr>
                                <td>
                                    General Attribute:
                                </td>
                                <td>
                                    <telerik:RadTextBox ID="radTxtGenAttr" runat="server" Text='<%# Bind("ContactName") %>'
                                        ControlToValidate="radTxtGenAttr" Height="10px" Width="160px">
                                    </telerik:RadTextBox>
                                    <asp:Label ID="LblErrMsg" runat="server" ForeColor="Red"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="left" colspan="2">
                                    <asp:Button ID="btnInsert" Text="Insert" runat="server" CommandName="PerformInsert">
                                    </asp:Button>
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                        CommandName="Cancel"></asp:Button>
                                </td>
                            </tr>
                        </table>
                    </asp:PlaceHolder>
                </FormTemplate>
            </EditFormSettings>
            <%-- RC-11/7/11 END --%>
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                    Visible="false">
                    <ItemStyle CssClass="MyImageButton" />
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="CustomerID" DataType="System.Int32" HeaderText="CustomerID"
                    ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CompanyName" HeaderText="General Attributes"
                    SortExpression="CompanyName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                    ShowFilterIcon="false" UniqueName="CompanyName" ColumnEditorID="GridTextBoxColumnEditor1"
                    AllowFiltering="true" AllowSorting="true">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
        <PagerStyle Mode="NextPrevAndNumeric" />
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        SelectCommand="SELECT * FROM [Customers]"></asp:SqlDataSource>
    </form>
</body>
</html>
