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

<%@ 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>
    <style type="text/css">
        html
        {
            overflow: auto;
        }
        html, body, form
        {
            margin: 0;
            height: 100%;
        }
    </style>

    <script type="text/javascript">
        //        window.onload = function() { debugger; }

        function CopyTextToLeftField(leftFieldID, rightFieldID) {
            var leftValue = document.getElementById(leftFieldID).value;
            var rightTextBox = document.getElementById(rightFieldID)
            rightTextBox.value = leftValue;
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
        AllowMultiRowSelection="true" AllowMultiRowEdit="true" AllowSorting="True" DataSourceID="SqlDataSource1"
        GridLines="None" PageSize="3" ShowGroupPanel="true" OnItemDataBound="RadGrid1_ItemDataBound"
        OnItemCreated="RadGrid1_ItemCreated" OnItemCommand="RadGrid1_ItemCommand" 
        onprerender="RadGrid1_PreRender1">
        <PagerStyle Mode="NextPrev" />
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="SqlDataSource1"
            TableLayout="Auto" GroupLoadMode="Client" CommandItemDisplay="Top">
            <CommandItemTemplate>
                <asp:Button ID="btnTest" runat="server" Text="Test" CommandName="Test" Visible='<%# CustomSelectedIndexes.Count == 0 %>' />
            </CommandItemTemplate>
            <Columns>
                <telerik:GridEditCommandColumn UniqueName="EditColumn">
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="Id" ReadOnly="True"
                    SortExpression="Id" UniqueName="Id">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="TinyIntValue" DataType="System.Byte" HeaderText="TinyIntValue"
                    SortExpression="TinyIntValue" UniqueName="TinyIntValue">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn UniqueName="GridDateTimeColumn1" DataField="TestDate"
                    HeaderText="TestDate" PickerType="DatePicker">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="TinyIntValue" DataType="System.Byte" HeaderText="TinyIntValue2"
                    SortExpression="TinyIntValue" UniqueName="TinyIntValue2">
                </telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
        <%--<PagerStyle PagerTextFormat="Change page: {4}  |  Displaying page {0} of {1}, items {2} to {3} of {5}" />--%>
        <FilterMenu EnableTheming="True">
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
        </FilterMenu>
        <ClientSettings AllowDragToGroup="True" EnablePostBackOnRowClick="true">
            <Scrolling AllowScroll="True" />
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        SelectCommand="SELECT * FROM [TinyIntTest]"></asp:SqlDataSource>
    </form>
</body>
</html>
