<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.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">
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    
    <telerik:RadCodeBlock ID="rcb1" runat="server">
        <script type="text/javascript">

            function TabSelectedHandler_QMM(sender, eventArgs) {
                var tab = eventArgs.get_tab();

                switch (tab.get_value()) {
                    case "SEP":
                        grid = $find("<%= rgDataSEP.ClientID%>");
                        if (grid) {
                            grid.repaint();
                        }
                        break;

                    case "VR":
                        grid = $find("<%= rgDataVR.ClientID%>");
                        if (grid) {
                            grid.repaint();
                        }
                        break;
                }

            } 
              
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadTabStrip ID="tsQMM" runat="server" Skin="Office2007" MultiPageID="mpQMM"
        Width="600px" SelectedIndex="0" OnClientTabSelected="TabSelectedHandler_QMM">
        <Tabs>
            <telerik:RadTab ID="tab1" runat="server" PageViewID="pvSEP" Text="SEP" Value="SEP" />
            <telerik:RadTab ID="tab2" runat="server" PageViewID="pvVR" Text="VR" Value="VR" />
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="mpQMM" runat="server" Height="500px" Width="590px" SelectedIndex="0" CssClass="TabbedContent">
        <telerik:RadPageView ID="pvSEP" runat="server" Height="100%">
            <div style="padding: 7px; height: 100%;">
                <telerik:RadGrid ID="rgDataSEP" runat="server" AutoGenerateColumns="False" Skin="Office2007"
                    AllowSorting="False" AllowPaging="False" Height="100%" ShowFooter="False" DataSourceID="SqlDataSource1">
                    <MasterTableView DataKeyNames="CustomerID" ClientDataKeyNames="CustomerID" Width="100%"
                        TableLayout="Fixed">
                        <HeaderStyle Width="150px" />
                        <Columns>
                            <telerik:GridBoundColumn SortExpression="CustomerID" HeaderText="CustomerID" HeaderButtonType="TextButton"
                                DataField="CustomerID" UniqueName="CustomerID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="ContactName" HeaderText="Contact Name" HeaderButtonType="TextButton"
                                DataField="ContactName" UniqueName="ContactName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="CompanyName" HeaderText="Company" HeaderButtonType="TextButton"
                                DataField="CompanyName" UniqueName="CompanyName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="ContactTitle" HeaderText="ContactTitle"
                                HeaderButtonType="TextButton" DataField="ContactTitle" UniqueName="ContactTitle">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="Address" HeaderText="Address" HeaderButtonType="TextButton"
                                DataField="Address" UniqueName="Address">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="City" HeaderText="City" HeaderButtonType="TextButton"
                                DataField="City" UniqueName="City">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="Country" HeaderText="Country" HeaderButtonType="TextButton"
                                DataField="Country" UniqueName="Country">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <CommandItemTemplate>
                        </CommandItemTemplate>
                    </MasterTableView>
                    <ItemStyle BorderStyle="None" />
                    <GroupingSettings GroupByFieldsSeparator="" CaseSensitive="False" />
                    <ClientSettings AllowExpandCollapse="False">
                        <ClientEvents OnFilterMenuShowing="" />
                        <Selecting AllowRowSelect="False" />
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100%" FrozenColumnsCount="1" />
                        <Resizing AllowColumnResize="False" ClipCellContentOnResize="False" EnableRealTimeResize="False"
                            ResizeGridOnColumnResize="True" />
                    </ClientSettings>
                    <ExportSettings>
                    </ExportSettings>
                </telerik:RadGrid>
            </div>
        </telerik:RadPageView>
        <telerik:RadPageView ID="pvVR" runat="server" Height="100%">
            <div style="padding: 7px; height: 100%;">
                <telerik:RadGrid ID="rgDataVR" runat="server" AutoGenerateColumns="False" Skin="Office2007"
                    AllowSorting="False" AllowPaging="False" Height="100%" ShowFooter="False" DataSourceID="SqlDataSource1">
                    <MasterTableView DataKeyNames="CustomerID" ClientDataKeyNames="CustomerID" Width="100%"
                        TableLayout="Fixed">
                        <HeaderStyle Width="150px" />
                        <Columns>
                            <telerik:GridBoundColumn SortExpression="CustomerID" HeaderText="CustomerID" HeaderButtonType="TextButton"
                                DataField="CustomerID" UniqueName="CustomerID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="ContactName" HeaderText="Contact Name" HeaderButtonType="TextButton"
                                DataField="ContactName" UniqueName="ContactName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="CompanyName" HeaderText="Company" HeaderButtonType="TextButton"
                                DataField="CompanyName" UniqueName="CompanyName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="ContactTitle" HeaderText="ContactTitle"
                                HeaderButtonType="TextButton" DataField="ContactTitle" UniqueName="ContactTitle">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="Address" HeaderText="Address" HeaderButtonType="TextButton"
                                DataField="Address" UniqueName="Address">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="City" HeaderText="City" HeaderButtonType="TextButton"
                                DataField="City" UniqueName="City">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="Country" HeaderText="Country" HeaderButtonType="TextButton"
                                DataField="Country" UniqueName="Country">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <CommandItemTemplate>
                        </CommandItemTemplate>
                    </MasterTableView>
                    <ItemStyle BorderStyle="None" />
                    <GroupingSettings GroupByFieldsSeparator="" CaseSensitive="False" />
                    <ClientSettings AllowExpandCollapse="False">
                        <ClientEvents OnFilterMenuShowing="" />
                        <Selecting AllowRowSelect="False" />
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100%" FrozenColumnsCount="1" />
                        <Resizing AllowColumnResize="False" ClipCellContentOnResize="False" EnableRealTimeResize="False"
                            ResizeGridOnColumnResize="True" />
                    </ClientSettings>
                    <ExportSettings>
                    </ExportSettings>
                </telerik:RadGrid>
            </div>
        </telerik:RadPageView>
    </telerik:RadMultiPage>
   
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Customers"
        runat="server"></asp:SqlDataSource>
    </form>
</body>
</html>
