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

<%@ 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></title>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

        <script>

            function RowClick(sender, eventArgs) {

                editedRow = eventArgs.get_itemIndexHierarchical();
                $find("<%= GridFlex.MasterTableView.ClientID %>").editItem(editedRow);
            }

        </script>

    </telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadGrid ID="GridFlex" runat="server" AllowPaging="True" AllowSorting="True"
            OnNeedDataSource="GridFlex_NeedDataSource" GridLines="None" PageSize="40" ShowFooter="True"
            ShowGroupPanel="True" Skin="WebBlue">
            <HeaderContextMenu Skin="WebBlue">
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </HeaderContextMenu>
            <FooterStyle Height="20px" />
            <ItemStyle Height="20px" />
            <MasterTableView ShowFooter="True" AutoGenerateColumns="false" DataKeyNames="CustomerID">
                <Columns>
                    <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True"
                        SortExpression="CustomerID" UniqueName="CustomerID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName"
                        UniqueName="CompanyName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName"
                        UniqueName="ContactName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactTitle" HeaderText="ContactTitle" SortExpression="ContactTitle"
                        UniqueName="ContactTitle">
                    </telerik:GridBoundColumn>
                </Columns>
                <GroupHeaderItemStyle Height="15px" />
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnRowClick="RowClick" />
            </ClientSettings>
            <FilterMenu Skin="WebBlue">
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </FilterMenu>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>
