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

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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>Untitled Page</title>
</head>
<body style="width:1200px">
    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid2">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadGrid ID="RadGrid2" DataSourceID="SqlDataSource3" AllowPaging="True" runat="server"
                AutoGenerateColumns="False" AllowSorting="True" PageSize="3" GridLines="None"
                Skin="Vista" Width="950px">
                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                <MasterTableView DataKeyNames="OrderID" AutoGenerateColumns="false" TableLayout="Fixed">
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="ID" DataType="System.Int32" Display="false">
                            <ItemTemplate>
                                <asp:TextBox ID="TextBox" runat="server"></asp:TextBox>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn UniqueName="OrderID" HeaderText="GridBoundColumn" DataField="OrderID"
                            ReadOnly="true">
                        </telerik:GridBoundColumn>
                        <telerik:GridDateTimeColumn DataField="OrderDate" HeaderText="GridDateTimeColumn"
                            UniqueName="OrderDate" PickerType="DateTimePicker">
                        </telerik:GridDateTimeColumn>
                        <telerik:GridNumericColumn DataField="Freight" HeaderText="GridNumericColumn" UniqueName="Freight">
                        </telerik:GridNumericColumn>
                        <telerik:GridHTMLEditorColumn UniqueName="ShipAddress" DataField="ShipAddress" HeaderText="GridHTMLEditorColumn">
                        </telerik:GridHTMLEditorColumn>
                        <telerik:GridDropDownColumn DataField="OrderID" ListTextField="ShipCountry" ListValueField="OrderID"
                            DataSourceID="SqlDataSource4" HeaderText="GridDropDownColumn <br /> with RadComboBox"
                            DropDownControlType="RadComboBox">
                        </telerik:GridDropDownColumn>
                        <telerik:GridMaskedColumn UniqueName="ShipPostalCode" HeaderText="GridMaskedColumn"
                            DataField="ShipPostalCode" Mask="#####">
                        </telerik:GridMaskedColumn>
                        <telerik:GridCalculatedColumn HeaderText="Calculated Column" UniqueName="FullAddress"
                            DataType="System.String" DataFields="ShipCountry, ShipAddress" Expression='{0} + "&nbsp;" + {1}'>
                        </telerik:GridCalculatedColumn>
                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                        </telerik:GridEditCommandColumn>
                    </Columns>
                </MasterTableView>
                <HeaderStyle Width="100px" />
                <ClientSettings>
                    <Resizing ClipCellContentOnResize="false" AllowColumnResize="true" EnableRealTimeResize="true" ResizeGridOnColumnResize="true" />
                </ClientSettings>
            </telerik:RadGrid>
                       <asp:SqlDataSource ID="SqlDataSource3" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
                ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Orders" runat="server">
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSource4" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
                ProviderName="System.Data.SqlClient" SelectCommand="SELECT OrderID, ShipCountry FROM Orders"
                runat="server"></asp:SqlDataSource>
        </div>
    </form>
</body>
</html>
