<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!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>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <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 Java Script code here.
    </script>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid1" DataSourceID="SqlDataSource1"
            AllowFilteringByColumn="True" EnableLinqExpressions="False" ShowFooter="True"
            runat="server" GridLines="None" AllowPaging="True">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <HeaderContextMenu EnableAutoScroll="True">
            </HeaderContextMenu>
            <MasterTableView>
                <Columns>
                    <telerik:GridBoundColumn Aggregate="Count" DataField="ProductID" HeaderText="Product ID"
                        FooterText="Total products: ">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProductName" HeaderText="Product name" SortExpression="ProductName"
                        UniqueName="ProductName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn Aggregate="Sum" DataField="UnitPrice" HeaderText="Unit price"
                        FooterText="Total price: ">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn Aggregate="Sum" DataField="UnitsInStock" HeaderText="Units in stock"
                        FooterText="All units in stock: ">
                    </telerik:GridBoundColumn>
                    <telerik:GridCalculatedColumn UniqueName="TotalPrice" HeaderText="% Desv." DataFields="UnitPrice, UnitsInStock"
                        Expression="IIF({0}<>0,{1}/{0}*100-UnitsInStock,0.00)" DataFormatString="{0:######0.00}"
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right"
                        DataType="System.Decimal" Aggregate="Avg" HeaderStyle-Width="55" />
                    
                </Columns>
            </MasterTableView>
            <ClientSettings EnableRowHoverStyle="true" />
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT * FROM [Products]" runat="server"></asp:SqlDataSource>
    </div>
    </form>
</body>
</html>
