<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <telerik:RadGrid runat="server" ID="radgrid"
        ShowFooter="True" CssClass="RadGrid"
   
        OnNeedDataSource="radgrid_NeedDataSource"
        
        AllowFilteringByColumn="True" AllowSorting="True"
        AutoGenerateColumns="true" Width="850px" Height="600px"
        ShowGroupPanel="True" AllowPaging="True" CellSpacing="0" GridLines="None" PageSize="50" PagerStyle-Visible="true">
        <ExportSettings HideStructureColumns="true">
        </ExportSettings>
        <PagerStyle Mode="Advanced" AlwaysVisible="true" />
        <MasterTableView ShowGroupFooter="true" AllowMultiColumnSorting="true" UseAllDataFields="true"
            CommandItemDisplay="Top" EnableHeaderContextMenu="true" TableLayout="Auto" EnableHeaderContextAggregatesMenu="true">
            <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"></CommandItemSettings>
            <GroupFooterTemplate>
                <asp:Label runat="server" ID="OrderId" Visible="true" Text='<%# "OrderId: "+ VisibleColumn("OrderId")%>'></asp:Label>
                <asp:Label runat="server" ID="PurchaseCost" Visible="false" Text='<%# "Cost: "+ VisibleColumn("Cost")%>'></asp:Label>
                <asp:Label runat="server" ID="RefundAmount" Visible="false" Text='<%# "Refund Amount: "+ VisibleColumn("RefundAmount") %>'></asp:Label>
            </GroupFooterTemplate>
        </MasterTableView>
        <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True">
            <Scrolling AllowScroll="True"></Scrolling>
        </ClientSettings>

        <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
    </telerik:RadGrid>
</asp:Content>
