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

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!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>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                SelectCommand="SELECT * FROM [Products]"></asp:SqlDataSource>
        </div>
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None"
            Skin="WebBlue" Width="100%" AllowMultiRowSelection="True" AllowSorting="True"
            OnEditCommand="RadGrid1_EditCommand">
            <MasterTableView AutoGenerateColumns="False" TableLayout="Fixed" DataKeyNames="ProductID"
                DataSourceID="SqlDataSource1">
                <Columns>
                    <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32" HeaderText="ProductID"
                        ReadOnly="True" SortExpression="ProductID" UniqueName="ProductID">
                        <HeaderStyle Width="12%" />
                        <ItemStyle VerticalAlign="Top" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName"
                        UniqueName="ProductName">
                        <HeaderStyle Width="14%" />
                        <ItemStyle VerticalAlign="Top" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SupplierID" DataType="System.Int32" HeaderText="SupplierID"
                        SortExpression="SupplierID" UniqueName="SupplierID">
                        <HeaderStyle Width="39%" />
                        <ItemStyle VerticalAlign="Top" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CategoryID" DataType="System.Int32" HeaderText="CategoryID"
                        SortExpression="CategoryID" UniqueName="CategoryID">
                        <ItemStyle VerticalAlign="Top" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="QuantityPerUnit" HeaderText="QuantityPerUnit"
                        SortExpression="QuantityPerUnit" UniqueName="QuantityPerUnit">
                        <ItemStyle VerticalAlign="Top" />
                    </telerik:GridBoundColumn>
                    <%--                    <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal" HeaderText="UnitPrice"
                        SortExpression="UnitPrice" UniqueName="UnitPrice">
                        <ItemStyle VerticalAlign="Top" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UnitsInStock" DataType="System.Int16" HeaderText="UnitsInStock"
                        SortExpression="UnitsInStock" UniqueName="UnitsInStock">
                        <ItemStyle VerticalAlign="Top" />
                    </telerik:GridBoundColumn>--%>
                    <telerik:GridBoundColumn DataField="UnitsOnOrder" DataType="System.Int16" HeaderText="UnitsOnOrder"
                        SortExpression="UnitsOnOrder" UniqueName="UnitsOnOrder" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ReorderLevel" DataType="System.Int16" HeaderText="ReorderLevel"
                        SortExpression="ReorderLevel" UniqueName="ReorderLevel" Visible="false">
                    </telerik:GridBoundColumn>
<%--                    <telerik:GridCheckBoxColumn DataField="Discontinued" DataType="System.Boolean" HeaderText="Discontinued"
                        SortExpression="Discontinued" UniqueName="Discontinued">
                    </telerik:GridCheckBoxColumn>--%>
                </Columns>
                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                    Font-Underline="False" ForeColor="Black" Wrap="True" />
            </MasterTableView>
            <SelectedItemStyle BackColor="#99CCFF" />
            <ClientSettings>
                <Selecting AllowRowSelect="true" />
                <Scrolling AllowScroll="True" UseStaticHeaders="true"></Scrolling>
            </ClientSettings>
        </telerik:RadGrid>

    </form>
</body>
</html>
