<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadUploadInRadGrid.aspx.cs"
    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>Context Menu and Styling</title>
    <style type="text/css">
        
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <script type="text/javascript">
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />
    <br />
    <br />
    <telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1" DataSourceID="SqlDataSource1"
        Width="760px" AllowFilteringByColumn="True" AllowSorting="True" PageSize="15"
        AllowPaging="True" runat="server">
        <PagerStyle Mode="NextPrevAndNumeric" />
        <ClientSettings Selecting-AllowRowSelect="true" AllowKeyboardNavigation="true" EnableRowHoverStyle="true"
            EnableAlternatingItems="true">
            <ClientEvents />
        </ClientSettings>
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView AutoGenerateColumns="false" IsFilterItemExpanded="false" EditMode="PopUp"
            AllowFilteringByColumn="True" ShowFooter="True" TableLayout="Auto">
            <EditFormSettings EditFormType="WebUserControl" UserControlName="StudentDependent.ascx"
                InsertCaption="Add new dependent">
                <PopUpSettings Modal="true" ScrollBars="Auto" />
            </EditFormSettings>
            <GroupByExpressions>
                <telerik:GridGroupByExpression>
                    <SelectFields>
                        <telerik:GridGroupByField FieldAlias="ShipName" FieldName="ShipName"></telerik:GridGroupByField>
                    </SelectFields>
                    <GroupByFields>
                        <telerik:GridGroupByField FieldName="ShipName" SortOrder="Descending"></telerik:GridGroupByField>
                    </GroupByFields>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>
            <Columns>
                <telerik:GridEditCommandColumn>
                </telerik:GridEditCommandColumn>
                <telerik:GridNumericColumn DataField="OrderID" HeaderText="OrderID" SortExpression="OrderID"
                    UniqueName="OrderID">
                </telerik:GridNumericColumn>
                <telerik:GridBoundColumn DataField="ShipName" HeaderText="ShipName" SortExpression="ShipName"
                    UniqueName="ShipName">
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn DataField="OrderDate" HeaderText="OrderDate" SortExpression="OrderDate"
                    UniqueName="OrderDate" PickerType="None" DataFormatString="{0:d}" HeaderStyle-Width="120px">
                </telerik:GridDateTimeColumn>
                <telerik:GridDateTimeColumn DataField="ShippedDate" HeaderText="ShippedDate" SortExpression="ShippedDate"
                    UniqueName="ShippedDate" PickerType="DatePicker" DataFormatString="{0:D}">
                    <HeaderStyle Width="160px" />
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="ShipCountry" HeaderText="ShipCountry" SortExpression="ShipCountry"
                    UniqueName="ShipCountry">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="ShipCity" GroupByExpression="ShipCity Group by ShipCity"
                    UniqueName="ShipCity" InitializeTemplatesFirst="false" HeaderStyle-Width="100"
                    HeaderText="Ship city">
                    <HeaderTemplate>
                        <table>
                            <tr>
                                <td>
                                    <asp:LinkButton ID="lnkSort" runat="server" CommandArgument="ShipCity" CommandName="Sort"
                                        Text="Ship city"></asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblCity" runat="server" Text='<%#Eval("ShipCity") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridMaskedColumn DataField="ShipPostalCode" HeaderText="ShipPostalCode"
                    SortExpression="ShipPostalCode" UniqueName="ShipPostalCode" Mask="#####">
                    <FooterStyle Font-Bold="true" />
                </telerik:GridMaskedColumn>
                <telerik:GridNumericColumn DataField="Freight" DataType="System.Decimal" HeaderText="Freight"
                    SortExpression="Freight" UniqueName="Freight" Aggregate="Sum">
                    <FooterStyle Font-Bold="true" />
                </telerik:GridNumericColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <Scrolling AllowScroll="false" />
        </ClientSettings>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Orders" runat="server">
    </asp:SqlDataSource>
    </form>
</body>
</html>
