Minor Problem with deep nested view

3 posts, 0 answers
  1. Jack Voss
    Jack Voss avatar
    27 posts
    Member since:
    May 2010

    Posted 13 May 2011 Link to this post

    Hi, I have an aspx page using Datagrids and the nested view templates.
    Lets see if I can explain this. 
        The top level grid,  GridA has  a nested view template.  On this template is a panel, with a multi-page and a tab.  
        Each page view has a grid. 
        
        These grids in turn my have nestedviews with a panel and a multiview with a tab, and so on and so on.

    The only issue I am having, is that by the third level the panels are not displaying the grids.
    If there are 3 tabs, and tab 0 is selected, you can see the tab but not the grid.
    You select tab 1 and it displays it's grid properly.
    You reselect tab 0 and "tada" the grid is now displayed properly.

    This only happens once we get deeper into the nested views of the grid.  The code is all basically the same.

    I will attach my aspx page, the code behind, and a series of three pictures that should demonstrate what I am seeing.

    If anyone has any ideas of what is causing it, please let me know.  

    Thank you.

    aspx:
    <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
        CodeBehind="Default.aspx.cs" Inherits="ECSMT._Default" %>
      
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
      
    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    </asp:Content>
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent" >
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="tcbSearch">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="tcbSearch"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="grdCMT" LoadingPanelID="RadAjaxLoadingPanel1" ></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="tcbClear">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="tcbClear"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="grdCMT" LoadingPanelID="RadAjaxLoadingPanel1" ></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="grdCMT">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grdCMT" LoadingPanelID="RadAjaxLoadingPanel1" ></telerik:AjaxUpdatedControl>
                    </UpdatedControls
                </telerik:AjaxSetting>
            </AjaxSettings>
         </telerik:RadAjaxManager>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="600">
        </telerik:RadScriptManager>
        <script type="text/javascript" >
            function ShowViewForm(id, rowIndex) 
            {
                window.radopen("/ECSMT/OrderDetail.aspx?OrderNumType=" + id, "frmOrderDetail" + id );
                return false;
            }
            function ShowOrdValidationForm(id, rowIndex) 
            {
                window.radopen("/ECSMT/OrderValidation.aspx?OrderNumType=" + id, "frmOrderValidation" + id);
                return false;
            }
       </script>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue">
      
        </telerik:RadAjaxLoadingPanel>
        <asp:UpdatePanel ID="MainUpdatePanel" runat="server" width="100%" height="600" >
            <ContentTemplate >
                    <telerik:RadSplitter ID="rsFilter" runat="server" Width="100%"  Height="525" Orientation="Vertical" >
                        <telerik:RadPane ID="rpFilter" runat="server" Width="40px" BackColor="#DAE2E8" Skin = "WebBlue" MinHeight = "600" Height = "100%">
                            <telerik:RadSlidingZone ID="rszFilter" Runat="server">
                                <telerik:RadSlidingPane ID="rspFilter" runat="server" Width="225px" Height="100%" Title="Select Filters"
                                    EnableDock="false" MinWidth="225" BackColor="#DAE2E8" Skin = "WebBlue">
                                    <asp:Table ID="tblFilter" runat="server">
                                        <asp:TableRow ID="tblrJDENum" runat="server">
                                            <asp:TableCell ID="tclJDENum" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblJDENum" runat="server" Text="JDE #"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctJDENum" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtJDENum" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                        <asp:TableRow ID="tblrCMTNum" runat="server">
                                            <asp:TableCell ID="tclCMTNum" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblCMTNum" runat="server" Text="CMT #"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctCMTNum" runat="server" HorizontalAlign="Left">
    <%--                                            <telerik:RadComboBox ID="rcmbCMTNum" runat="server" DataTextField="CustName" DataValueField="ABAN8" skin="WebBlue"
                                                    Height="200px" Width="135px" DropDownWidth="300px" AutoPostBack="true" ToolTip="" MarkFirstMatch="True">
                                                </telerik:RadComboBox>--%>
                                                <telerik:RadTextBox ID="rtxtCMT" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrCompanyName" runat="server">
                                            <asp:TableCell ID="tclCompanyName" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblCompanyName" runat="server" Text="Company Name"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctCompanyName" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtCompanyName" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                        <asp:TableRow ID="tblrCustUser" runat="server">
                                            <asp:TableCell ID="tclCustUser" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblCustUser" runat="server" Text="Customer User"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctCustUser" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtCustUser" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                        <asp:TableRow ID="tblrEmail" runat="server">
                                            <asp:TableCell ID="tclEmail" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblEmail" runat="server" Text="EMail"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctEmail" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtEmail" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrCity" runat="server">
                                            <asp:TableCell ID="tclCity" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblCity" runat="server" Text="City"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctCity" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtCity" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrState" runat="server">
                                            <asp:TableCell ID="tclState" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblState" runat="server" Text="State"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctState" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtState" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrZip" runat="server">
                                            <asp:TableCell ID="tclZip" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblZip" runat="server" Text="Zip Code"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctZip" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtZip" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrPhone" runat="server">
                                            <asp:TableCell ID="tclPhone" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblPhone" runat="server" Text="Phone #"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctPhone" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtPhone" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrRM" runat="server">
                                            <asp:TableCell ID="tclRM" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblRM" runat="server" Text="Regional Mgr"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctRM" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtRM" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrTerr" runat="server">
                                            <asp:TableCell ID="tclTerr" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblTerr" runat="server" Text="CMT Terr"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctTerr" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtTerr" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrOrderNum" runat="server">
                                            <asp:TableCell ID="tclOrderNum" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblOrderNum" runat="server" Text="Sales Order #"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctOrderNum" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtOrderNum" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrPO" runat="server">
                                            <asp:TableCell ID="tclPO" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblPO" runat="server" Text="PO #"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctPO" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtPO" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrGP" runat="server">
                                            <asp:TableCell ID="tclGP" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblGP" runat="server" Text="GP #"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctGP" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtGP" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrIncident" runat="server">
                                            <asp:TableCell ID="tclIncident" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblIncident" runat="server" Text="Incident #"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctIncident" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtIncident" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrInstaller" runat="server">
                                            <asp:TableCell ID="tclInstaller" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblInstaller" runat="server" Text="Installer Co. ID"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctInstaller" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtInstaller" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrTracking" runat="server">
                                            <asp:TableCell ID="tclTracking" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblTracking" runat="server" Text="Tracking #"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctTraclomg" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtTracking" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                         <asp:TableRow ID="tblrProduct" runat="server">
                                            <asp:TableCell ID="tclProduct" runat="server" HorizontalAlign="Right">
                                                <asp:Label ID="lblProduct" runat="server" Text="Product Types"></asp:Label>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tctProduct" runat="server" HorizontalAlign="Left">
                                                <telerik:RadTextBox ID="rtxtProduct" runat="server" Skin="WebBlue"></telerik:RadTextBox>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                        <asp:TableRow ID="tblrCommands" runat="server">
                                            <asp:TableCell ID="tcbClear" runat="server" HorizontalAlign="Center" >
                                                <telerik:RadButton ID="btnClear" runat="server" Text = "Clear" 
                                                            ToolTip="Clears the current filter selections." Skin="WebBlue" OnClick="tcbClear_OnClick"
                                                            <Icon PrimaryIconUrl="~/Images/reload_16.png" PrimaryIconLeft="5px" />
                                                </telerik:RadButton>
                                            </asp:TableCell>
                                            <asp:TableCell ID="tcbSearch" runat="server" HorizontalAlign="Center">
                                                <telerik:RadButton ID="rbtnSearch" runat="server" Text = "Search" 
                                                    ToolTip="Search Using Current Filters" Skin="WebBlue" OnClick="tcbSearch_OnClick">
                                                    <Icon PrimaryIconUrl="~/Images/zoom_16.png" PrimaryIconLeft="5px" />
                                                </telerik:RadButton>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                    </asp:Table>
                                </telerik:RadSlidingPane>
                            </telerik:RadSlidingZone>
                        </telerik:RadPane>
                         <telerik:RadSplitBar ID="rsbFilter" runat="server">
                        </telerik:RadSplitBar>
                        <telerik:RadPane ID="rpTree" runat="server" scrolling="Both" width="100%" Height="100%">
                            <telerik:RadGrid ID="grdCMT" runat="server" Width="100%" Height="100%" ShowStatusBar="true" AutoGenerateColumns="False"
                                        AllowSorting="true" AllowMultiRowSelection="False" AllowPaging="true"
                                        ShowFooter="True" Skin="WebBlue" Pagesize="50" OnNeedDataSource="grdCMT_NeedDataSource" 
                                        OnItemCommand="grdCMT_ItemCommand" enabled="false" OnPageSizeChanged="grdCMT_PageSizeChanged">
                                        <FooterStyle BorderStyle="Solid" />
                                        <PagerStyle Mode="NextPrev" ></PagerStyle>
                                        <FilterMenu EnableTheming="True">
                                            <CollapseAnimation Duration="200" Type="OutQuint" />
                                        </FilterMenu>
                                        <MasterTableView Width="100%" DataKeyNames="CustomerNumber" AllowMultiColumnSorting="True" ItemStyle-HorizontalAlign="Justify"  ItemStyle-VerticalAlign="Middle"  GroupLoadMode="Server" >
                                            <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
                                            <Columns>
                                                    <telerik:GridBoundColumn SortExpression="CustomerNumber" HeaderText="Customer Number" HeaderButtonType="TextButton"
                                                        DataField="CustomerNumber" >
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn SortExpression="CustomerName" HeaderText="Customer Name" HeaderButtonType="TextButton"
                                                        DataField="CustomerName">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn SortExpression="City" HeaderText="City" HeaderButtonType="TextButton"
                                                        DataField="City">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn SortExpression="State" HeaderText="State" HeaderButtonType="TextButton"
                                                        DataField="State">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridDateTimeColumn SortExpression="LastNoteDate" HeaderText="LastNoteDate" HeaderButtonType="TextButton"
                                                        DataField="LastNoteDate" DataFormatString="{0:MM/dd/yyyy}"
                                                     </telerik:GridDateTimeColumn>
                                                    <telerik:GridBoundColumn SortExpression="ActiveRMA" HeaderText="Active RMA" HeaderButtonType="TextButton"
                                                        DataField="ActiveRMA">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn SortExpression="TerrRMNumber" HeaderText="RM #" HeaderButtonType="TextButton"
                                                        DataField="TerrRMNumber">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn SortExpression="TerrRMName" HeaderText="RM Name" HeaderButtonType="TextButton"
                                                        DataField="TerrRMName">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn SortExpression="CreditMgr" HeaderText="Credit Mgr" HeaderButtonType="TextButton"
                                                        DataField="CreditMgr">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn SortExpression="GPNum" HeaderText="GP Num" HeaderButtonType="TextButton"
                                                        DataField="GPNum">
                                                    </telerik:GridBoundColumn>
                                            </Columns>
                                            <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                            <PagerStyle AlwaysVisible="True" />
                                            <NestedViewSettings  >
                                                <ParentTableRelation  >
                                                        <telerik:GridRelationFields DetailKeyField="CustomerNumber" MasterKeyField="CustomerNumber" />
                                                </ParentTableRelation>
                                            </NestedViewSettings>
                                            <NestedViewTemplate >
                                                <telerik:RadAjaxPanel ID="InnerPanel1" runat="server" visible="false" >
                                                    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0">
                                                        <Tabs>
                                                            <telerik:RadTab runat="server" Text="Installs" PageViewID="rpvInstalls"></telerik:RadTab>
                                                            <telerik:RadTab runat="server" Text="Address Types" PageViewID="rpvAddress"></telerik:RadTab>
                                                            <telerik:RadTab runat="server" Text="Contacts And Users" PageViewID ="rpvCMTContacts"></telerik:RadTab>
                                                            <telerik:RadTab runat="server" Text="Orders" PageViewID ="rpvCMTOrders"></telerik:RadTab>
                                                        </Tabs>
                                                    </telerik:RadTabStrip>
                                                    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" RenderSelectedPageOnly="false">
                                                        <telerik:RadPageView ID="rpvInstalls" runat="server">
                                                            <telerik:RadGrid ID="rgrdInstalls" runat="server" AutoGenerateColumns="False"
                                                             AllowSorting="true" AllowMultiRowSelection="False" AllowPaging="true"
                                                             ShowFooter="false" Skin="WebBlue" Pagesize="5" OnNeedDataSource="grdInstalls_NeedDataSource"
                                                             OnItemCommand="grdInstalls_ItemCommand">
                                                             <MasterTableView width="100%" DataKeyNames="CustomerNumber" AllowMultiColumnSorting="true">
                                                                <Columns>
                                                                    <telerik:GridBoundColumn SortExpression="CustomerNumber" HeaderText="Addr #" HeaderButtonType="TextButton"
                                                                        DataField="CustomerNumber">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="Location" HeaderText="Location" HeaderButtonType="TextButton"
                                                                        DataField="Location">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="Address1" HeaderText="Street" HeaderButtonType="TextButton"
                                                                        DataField="Address1">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="City" HeaderText="City" HeaderButtonType="TextButton"
                                                                        DataField="City">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="State" HeaderText="State" HeaderButtonType="TextButton"
                                                                        DataField="State">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="Zip" HeaderText="Zip" HeaderButtonType="TextButton"
                                                                        DataField="Zip">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="RMNum" HeaderText="Phys RM #" HeaderButtonType="TextButton"
                                                                        DataField="RMNum">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="RMName" HeaderText="Phys RM Name" HeaderButtonType="TextButton"
                                                                        DataField="RMName">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="Territory" HeaderText="Territory" HeaderButtonType="TextButton"
                                                                        DataField="Territory">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="Active" HeaderText="Active" HeaderButtonType="TextButton"
                                                                        DataField="Active">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="MaxExpDte" HeaderText="Max Exp Date" HeaderButtonType="TextButton"
                                                                        DataField="MaxExpDte" DataFormatString="{0:MM/dd/yyyy}" >
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="CurrentStatus" HeaderText="CurrentStatus" HeaderButtonType="TextButton"
                                                                        DataField="CurrentStatus">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="ActualInstallDte" HeaderText="ActualInstallDte" HeaderButtonType="TextButton"
                                                                        DataField="ActualInstallDte" DataFormatString="{0:MM/dd/yyyy}" >
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="EditionName" HeaderText="Edition Name" HeaderButtonType="TextButton"
                                                                        DataField="EditionName">
                                                                    </telerik:GridBoundColumn>
                                                                    <telerik:GridBoundColumn SortExpression="KitNumber" HeaderText="Kit #" HeaderButtonType="TextButton"
                                                                        DataField="KitNumber">
                                                                    </telerik:GridBoundColumn>
                                                                </Columns>
                                                                <NestedViewSettings >
                                                                    <ParentTableRelation >
                                                                        <telerik:GridRelationFields DetailKeyField="CustomerNumber" MasterKeyField="CustomerNumber" />
                                                                    </ParentTableRelation>
                                                                </NestedViewSettings>
                                                                <NestedViewTemplate>
                                                                    <telerik:RadAjaxPanel ID="InnerPanelInstalls" runat="server" Visible="false">
                                                                        <telerik:RadTabStrip ID="rtabInstalls" runat="server" MultiPageID="rmpInstalls" SelectedIndex="0">
                                                                            <Tabs>
                                                                                <telerik:RadTab runat="server" Text="Equipment" PageViewID ="rpvInstEquipment"></telerik:RadTab>
                                                                                <telerik:RadTab runat="server" Text="Contacts" PageViewID ="rpvInstContacts"></telerik:RadTab>
                                                                                <telerik:RadTab runat="server" Text="Orders" PageViewID ="rpvInstOrders"></telerik:RadTab>
                                                                            </Tabs>
                                                                        </telerik:RadTabStrip>
                                                                        <telerik:RadMultiPage ID="rmpInstalls" runat="server">
                                                                            <telerik:RadPageView Id="rpvInstEquipment" runat="server" >
                                                                                <telerik:RadGrid ID="rgrdInstEquipment" runat="server" AllowSorting="true" AllowMultiRowSelection="false" AutoGenerateColumns="False"
                                                                                    AllowPaging="true" Skin="WebBlue" PageSize="5" OnNeedDataSource="rgrdInstEquipment_NeedDataSource" >
                                                                                    <MasterTableView Width="100%" DataKeyNames="EquipNum" AllowMultiColumnSorting="true" >
                                                                                        <Columns>
                                                                                            <telerik:GridBoundColumn SortExpression="EquipNum" HeaderText="Equipment #" HeaderButtonType="TextButton" DataField="EquipNum" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="ParentNum" HeaderText="ParentNum" HeaderButtonType="TextButton" DataField="ParentNum" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="InvTypeCode" HeaderText="Description" HeaderButtonType="TextButton" DataField="InvTypeCode" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="SerialNum" HeaderText="Serial #" HeaderButtonType="TextButton" DataField="SerialNum">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="OS" HeaderText="OS" HeaderButtonType="TextButton" DataField="OS">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="Make" HeaderText="Make" HeaderButtonType="TextButton" DataField="Make" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="Model" HeaderText="Model" HeaderButtonType="TextButton" DataField="Model" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="InstallDteInService" HeaderText="Date In Service" HeaderButtonType="TextButton"
                                                                                                DataField="InstallDteInService" DataFormatString="{0:MM/dd/yyyy}" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="InstallDteOutOfService" HeaderText="Date Out Of Service" HeaderButtonType="TextButton"
                                                                                                DataField="InstallDteOutOfService" DataFormatString="{0:MM/dd/yyyy}" >
                                                                                            </telerik:GridBoundColumn>
                                                                                             <telerik:GridBoundColumn SortExpression="InstallSpecNotes" HeaderText="Special Notes" HeaderButtonType="TextButton" DataField="InstallSpecNotes" >
                                                                                            </telerik:GridBoundColumn>
                                                                                        </Columns>
                                                                                        <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                        <PagerStyle AlwaysVisible="false"></PagerStyle>
                                                                                    </MasterTableView
                                                                                </telerik:RadGrid
                                                                            </telerik:RadPageView>
                                                                            <telerik:RadPageView ID="rpvInstContacts" runat="server">
                                                                                <telerik:RadGrid ID="rgrdInstContacts" runat="server" AllowSorting="true" AllowMultiRowSelection="false" AutoGenerateColumns="False"
                                                                                    AllowPaging="true" Skin="WebBlue" PageSize="5" OnNeedDataSource="rgrdContacts_NeedDataSource" 
                                                                                    OnItemCommand="rgrdInstContacts_ItemCommand">
                                                                                    <MasterTableView Width="100%" DataKeyNames="ContactID" AllowMultiColumnSorting="true" >
                                                                                        <Columns>
                                                                                            <telerik:GridBoundColumn SortExpression="ContactID" HeaderText="ContactID" HeaderButtonType="TextButton" DataField="ContactID" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="FirstName" HeaderText="FirstName" HeaderButtonType="TextButton" DataField="FirstName">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="LastName" HeaderText="LastName" HeaderButtonType="TextButton" DataField="LastName">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="Title" HeaderText="Title" HeaderButtonType="TextButton" DataField="Title">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="Description" HeaderText="Description" HeaderButtonType="TextButton" DataField="Description">
                                                                                            </telerik:GridBoundColumn>
                                                                                        </Columns>
                                                                                        <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                        <PagerStyle AlwaysVisible="false"></PagerStyle>
                                                                                        <NestedViewSettings >
                                                                                            <ParentTableRelation >
                                                                                                <telerik:GridRelationFields DetailKeyField="ContactID" MasterKeyField="ContactID" />
                                                                                            </ParentTableRelation>
                                                                                        </NestedViewSettings>
                                                                                        <NestedViewTemplate>
                                                                                            <telerik:RadAjaxPanel ID="InnerPanelInstContacts" runat="server" Visible="false" >
                                                                                                    <telerik:RadTabStrip ID="rtabInstContacts" runat="server" MultiPageID="rmpInstContacts" SelectedIndex="0">
                                                                                                    <Tabs>
                                                                                                        <telerik:RadTab runat="server" Text="Phone List" PageViewID ="rpvInstPhones"></telerik:RadTab>
                                                                                                        <telerik:RadTab runat="server" Text="EMail List" PageViewID ="rpvInstEmails"></telerik:RadTab>
                                                                                                    </Tabs>
                                                                                                </telerik:RadTabStrip
                                                                                                <telerik:RadMultiPage ID="rmpInstContacts" runat="server">
                                                                                                    <telerik:RadPageView ID="rpvInstPhones" runat="server">
                                                                                                        <telerik:RadGrid ID="rgrdInstPhones" runat="server" AutoGenerateColumns="false" 
                                                                                                            AllowSorting="true" AllowMultiRowSelection="false" AllowPaging="true" 
                                                                                                            ShowFooter="false" Skin="WebBlue" PageSize="5" OnNeedDataSource="rgrdPhones_NeedDataSource">
                                                                                                            <MasterTableView Width="100%" DataKeyNames="ContactID" AllowMultiColumnSorting="true">
                                                                                                                <Columns>
                                                                                                                    <telerik:GridBoundColumn SortExpression="ContactID" HeaderText="ContactID" HeaderButtonType="TextButton"
                                                                                                                            DataField="ContactID" Visible="false" >
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="PhoneType" HeaderText="PhoneType" HeaderButtonType="TextButton" 
                                                                                                                        DataField="PhoneType">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="AreaCode" HeaderText="AreaCode" HeaderButtonType="TextButton" 
                                                                                                                        DataField="AreaCode">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="PhoneNumber" HeaderText="PhoneNumber" HeaderButtonType="TextButton" 
                                                                                                                        DataField="PhoneNumber">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                </Columns>
                                                                                                                <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                                                <PagerStyle AlwaysVisible="false"></PagerStyle>
                                                                                                            </MasterTableView>
                                                                                                        </telerik:RadGrid>
                                                                                                    </telerik:RadPageView>
                                                                                                    <telerik:RadPageView ID="rpvInstEmails" runat="server">
                                                                                                        <telerik:RadGrid ID="rgrdInstEmails" runat="server" AutoGenerateColumns="false" 
                                                                                                            AllowSorting="true" AllowMultiRowSelection="false" AllowPaging="true" 
                                                                                                            ShowFooter="false" Skin="WebBlue" PageSize="5" OnNeedDataSource="rgrdEMails_NeedDataSource">
                                                                                                            <MasterTableView Width="100%" DataKeyNames="ContactID" AllowMultiColumnSorting="true">
                                                                                                                <Columns>
                                                                                                                    <telerik:GridBoundColumn SortExpression="ContactID" HeaderText="ContactID" HeaderButtonType="TextButton"
                                                                                                                            DataField="ContactID" Visible="false" >
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="EMail" HeaderText="EMail" HeaderButtonType="TextButton" 
                                                                                                                        DataField="EMail">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                </Columns>
                                                                                                                <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                                                <PagerStyle AlwaysVisible="false"></PagerStyle>
                                                                                                            </MasterTableView>
                                                                                                        </telerik:RadGrid>
                                                                                                    </telerik:RadPageView>
                                                                                                </telerik:RadMultiPage>
                                                                                            </telerik:RadAjaxPanel>
                                                                                        </NestedViewTemplate>
                                                                                    </MasterTableView>
                                                                                </telerik:RadGrid>
                                                                            </telerik:RadPageView>
                                                                            <telerik:RadPageView ID="rpvInstOrders" runat="server">
                                                                                <telerik:RadGrid ID="rgrdInstOrders" runat="server" AutoGenerateColumns="False"
                                                                                    AllowSorting="true" AllowMultiRowSelection="False" AllowPaging="true"
                                                                                    ShowFooter="False" Skin="WebBlue" Pagesize="5" OnNeedDataSource="rgrdOrders_NeedDataSource" OnItemCreated="rgrdOrders_ItemCreated">
                                                                                    <FooterStyle BorderStyle="Solid" />
                                                                                    <MasterTableView Width="100%" DataKeyNames="OrderNum" AllowMultiColumnSorting="True" ItemStyle-HorizontalAlign="Justify"  ItemStyle-VerticalAlign="Middle" >
                                                                                        <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
                                                                                        <Columns>
                                                                                            <telerik:GridBoundColumn SortExpression="OrderNumType" HeaderText="OrderNumType" HeaderButtonType="TextButton"
                                                                                                DataField="OrderNumType" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="OrderNum" HeaderText="Order #" HeaderButtonType="TextButton"
                                                                                                DataField="OrderNum">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="OrderType" HeaderText="Type" HeaderButtonType="TextButton"
                                                                                                DataField="OrderType" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridDateTimeColumn SortExpression="StartDate" HeaderText="Lifetime Start Date" HeaderButtonType="TextButton"
                                                                                                DataField="StartDate" DataFormatString="{0:MM/dd/yyyy}">
                                                                                            </telerik:GridDateTimeColumn>
                                                                                            <telerik:GridDateTimeColumn SortExpression="EndDate" HeaderText="Lifetime End Date" HeaderButtonType="TextButton"
                                                                                                DataField="EndDate" DataFormatString="{0:MM/dd/yyyy}">
                                                                                            </telerik:GridDateTimeColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="OrderRM" HeaderText="Selling RM #" HeaderButtonType="TextButton"
                                                                                                DataField="OrderRM">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="RMName" HeaderText="Selling RM Name" HeaderButtonType="TextButton"
                                                                                                DataField="RMName">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="ECSPCSBoth" HeaderText="E/P/B" HeaderButtonType="TextButton"
                                                                                                DataField="ECSPCSBoth">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="MnthlySubscripValue" HeaderText="Monthly Subscrip. $" HeaderButtonType="TextButton"
                                                                                                DataField="MnthlySubscripValue">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridTemplateColumn UniqueName="ViewOrderColumn" HeaderText="View">
                                                                                                <ItemTemplate>
                                                                                                    <asp:HyperLink ID="ViewLink" runat="server" Text="View"></asp:HyperLink>
                                                                                                    </ItemTemplate>
                                                                                            </telerik:GridTemplateColumn>
                                                                                            <telerik:GridTemplateColumn UniqueName="ValidateOrderColumn" HeaderText="Validate">
                                                                                                <ItemTemplate>
                                                                                                    <asp:HyperLink ID="ValidationLink" runat="server" Text="Validate"></asp:HyperLink>
                                                                                                    </ItemTemplate>
                                                                                            </telerik:GridTemplateColumn>
                                                                                        </Columns>
                                                                                        <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                        <PagerStyle AlwaysVisible="false" />
                                                                                    </MasterTableView>
                                                                                </telerik:RadGrid>
                                                                            </telerik:RadPageView>
                                                                        </telerik:RadMultiPage>
                                                                    </telerik:RadAjaxPanel>
                                                                    </NestedViewTemplate>
                                                             </MasterTableView>
                                                            </telerik:RadGrid>
                                                        </telerik:RadPageView>
                                                        <telerik:RadPageView ID="rpvAddress" runat="server">
                                                            <telerik:RadGrid ID="grdAddress" runat="server" AutoGenerateColumns="False"
                                                                    AllowSorting="true" AllowMultiRowSelection="False" AllowPaging="true"
                                                                    ShowFooter="false" Skin="WebBlue" Pagesize="5" OnNeedDataSource="grdAddress_NeedDataSource"
                                                                    OnItemCommand="grdAddress_ItemCommand">
                                                                    <FooterStyle BorderStyle="Solid" />
                                                                    <PagerStyle Mode="NextPrev" ></PagerStyle>
                                                                    <MasterTableView Width="100%" DataKeyNames="CustNumAndType" AllowMultiColumnSorting="True" ItemStyle-HorizontalAlign="Justify"  ItemStyle-VerticalAlign="Middle" >
                                                                        <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
                                                                        <Columns>
                                                                            <telerik:GridBoundColumn SortExpression="CustNumAndType" HeaderText="CustNumAndType" HeaderButtonType="TextButton"
                                                                                DataField="CustNumAndType" Visible="false">
                                                                            </telerik:GridBoundColumn>
                                                                            <telerik:GridBoundColumn SortExpression="CustomerType" HeaderText="Customer Type" HeaderButtonType="TextButton"
                                                                                DataField="CustomerType" >
                                                                            </telerik:GridBoundColumn>
                                                                            <telerik:GridBoundColumn SortExpression="AddCount" HeaderText="Total" HeaderButtonType="TextButton"
                                                                                DataField="AddCount">
                                                                            </telerik:GridBoundColumn>
                                                                            <telerik:GridBoundColumn SortExpression="ActiveCount" HeaderText="Active" HeaderButtonType="TextButton"
                                                                                DataField="ActiveCount">
                                                                            </telerik:GridBoundColumn>
                                                                            <telerik:GridBoundColumn SortExpression="InactiveCount" HeaderText="Inactive" HeaderButtonType="TextButton"
                                                                                DataField="InactiveCount">
                                                                            </telerik:GridBoundColumn>
                                                                        </Columns>
                                                                        <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                        <PagerStyle AlwaysVisible="false" />
                                                                        <NestedViewSettings >
                                                                            <ParentTableRelation >
                                                                                    <telerik:GridRelationFields DetailKeyField="CustNumAndType" MasterKeyField="CustNumAndType" />
                                                                            </ParentTableRelation>
                                                                        </NestedViewSettings>
                                                                        <NestedViewTemplate >
                                                                            <telerik:RadAjaxPanel ID="InnerPanel2" runat="server" Visible="false" >
                                                                                <telerik:RadGrid ID="grdAddresses" runat="server" AutoGenerateColumns="False"
                                                                                    AllowSorting="true" AllowMultiRowSelection="False" AllowPaging="true"
                                                                                    ShowFooter="False" Skin="WebBlue" Pagesize="5" OnNeedDataSource="grdAddresses_NeedDataSource"
                                                                                    OnItemCommand="grdAddresses_ItemCommand">
                                                                                    <FooterStyle BorderStyle="Solid" />
                                                                                    <MasterTableView Width="100%" DataKeyNames="CustomerNumber" AllowMultiColumnSorting="True" ItemStyle-HorizontalAlign="Justify"  ItemStyle-VerticalAlign="Middle" >
                                                                                        <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
                                                                                        <Columns>
                                                                                            <telerik:GridBoundColumn SortExpression="CustomerNumber" HeaderText="Addr #" HeaderButtonType="TextButton"
                                                                                                DataField="CustomerNumber">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="ContactName" HeaderText="Name" HeaderButtonType="TextButton"
                                                                                                DataField="ContactName" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="ContactTitle" HeaderText="Title" HeaderButtonType="TextButton"
                                                                                                DataField="ContactTitle">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="Address1" HeaderText="Street" HeaderButtonType="TextButton"
                                                                                                DataField="Address1">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="Address2" HeaderText="Street 2" HeaderButtonType="TextButton"
                                                                                                DataField="Address2">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="City" HeaderText="City" HeaderButtonType="TextButton"
                                                                                                DataField="City">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="State" HeaderText="State" HeaderButtonType="TextButton"
                                                                                                DataField="State">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="Zip" HeaderText="Zip" HeaderButtonType="TextButton"
                                                                                                DataField="Zip">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="RMNum" HeaderText="Phys RM #" HeaderButtonType="TextButton"
                                                                                                DataField="RMNum">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="RMName" HeaderText="Phys RM Name" HeaderButtonType="TextButton"
                                                                                                DataField="RMName">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="Territory" HeaderText="Territory" HeaderButtonType="TextButton"
                                                                                                DataField="Territory">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn SortExpression="Active" HeaderText="Active" HeaderButtonType="TextButton"
                                                                                                DataField="Active">
                                                                                            </telerik:GridBoundColumn>
                                                                                        </Columns>
                                                                                        <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                        <PagerStyle AlwaysVisible="false" />
                                                                                        <NestedViewSettings >
                                                                                            <ParentTableRelation >
                                                                                                <telerik:GridRelationFields DetailKeyField="CustomerNumber" MasterKeyField="CustomerNumber" />
                                                                                            </ParentTableRelation>
                                                                                        </NestedViewSettings>
                                                                                        <NestedViewTemplate>
                                                                                            <telerik:RadAjaxPanel ID="InnerPanel3" runat="server" Visible="false" >
                                                                                                <telerik:RadTabStrip ID="rtab" runat="server" MultiPageID="RadMultiPage2" SelectedIndex="0">
                                                                                                    <Tabs>
                                                                                                        <telerik:RadTab runat="server" Text="Contacts" PageViewID ="rpvContacts"></telerik:RadTab>
                                                                                                        <telerik:RadTab runat="server" Text="Orders" PageViewID ="rpvOrders"></telerik:RadTab>
                                                                                                    </Tabs>
                                                                                                </telerik:RadTabStrip>
                                                                                                <telerik:RadMultiPage ID="RadMultiPage2" runat="server">
                                                                                                    <telerik:RadPageView ID="rpvContacts" runat="server">
                                                                                                        <telerik:RadGrid ID="rgrdContacts" runat="server" AllowSorting="true" AllowMultiRowSelection="false" AutoGenerateColumns="False"
                                                                                                            AllowPaging="true" Skin="WebBlue" PageSize="5" OnNeedDataSource="rgrdContacts_NeedDataSource"
                                                                                                            OnItemCommand="rgrdContacts_ItemCommand" >
                                                                                                            <MasterTableView Width="100%" DataKeyNames="ContactID" AllowMultiColumnSorting="true" >
                                                                                                                <Columns>
                                                                                                                    <telerik:GridBoundColumn SortExpression="ContactID" HeaderText="ContactID" HeaderButtonType="TextButton" DataField="ContactID" Visible="false" >
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="FirstName" HeaderText="FirstName" HeaderButtonType="TextButton" DataField="FirstName">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="LastName" HeaderText="LastName" HeaderButtonType="TextButton" DataField="LastName">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="Title" HeaderText="Title" HeaderButtonType="TextButton" DataField="Title">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="Description" HeaderText="Description" HeaderButtonType="TextButton" DataField="Description">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                </Columns>
                                                                                                                <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                                                <PagerStyle AlwaysVisible="false"></PagerStyle>
                                                                                                                <NestedViewSettings >
                                                                                                                    <ParentTableRelation >
                                                                                                                        <telerik:GridRelationFields DetailKeyField="ContactID" MasterKeyField="ContactID" />
                                                                                                                    </ParentTableRelation>
                                                                                                                </NestedViewSettings>
                                                                                                                <NestedViewTemplate>
                                                                                                                    <telerik:RadAjaxPanel ID="InnerPanelContacts" runat="server" Visible="false" >
                                                                                                                         <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="rmpContacts" SelectedIndex="0">
                                                                                                                            <Tabs>
                                                                                                                                <telerik:RadTab runat="server" Text="Phone List" PageViewID ="rpvPhones"></telerik:RadTab>
                                                                                                                                <telerik:RadTab runat="server" Text="EMail List" PageViewID ="rpvEmails"></telerik:RadTab>
                                                                                                                            </Tabs>
                                                                                                                        </telerik:RadTabStrip
                                                                                                                        <telerik:RadMultiPage ID="rmpContacts" runat="server">
                                                                                                                            <telerik:RadPageView ID="rpvPhones" runat="server">
                                                                                                                                <telerik:RadGrid ID="rgrdPhones" runat="server" AutoGenerateColumns="false" 
                                                                                                                                    AllowSorting="true" AllowMultiRowSelection="false" AllowPaging="true" 
                                                                                                                                    ShowFooter="false" Skin="WebBlue" PageSize="5" OnNeedDataSource="rgrdPhones_NeedDataSource">
                                                                                                                                    <MasterTableView Width="100%" DataKeyNames="ContactID" AllowMultiColumnSorting="true">
                                                                                                                                        <Columns>
                                                                                                                                            <telerik:GridBoundColumn SortExpression="ContactID" HeaderText="ContactID" HeaderButtonType="TextButton"
                                                                                                                                                    DataField="ContactID" Visible="false" >
                                                                                                                                            </telerik:GridBoundColumn>
                                                                                                                                            <telerik:GridBoundColumn SortExpression="PhoneType" HeaderText="PhoneType" HeaderButtonType="TextButton" 
                                                                                                                                                DataField="PhoneType">
                                                                                                                                            </telerik:GridBoundColumn>
                                                                                                                                            <telerik:GridBoundColumn SortExpression="AreaCode" HeaderText="AreaCode" HeaderButtonType="TextButton" 
                                                                                                                                                DataField="AreaCode">
                                                                                                                                            </telerik:GridBoundColumn>
                                                                                                                                            <telerik:GridBoundColumn SortExpression="PhoneNumber" HeaderText="PhoneNumber" HeaderButtonType="TextButton" 
                                                                                                                                                DataField="PhoneNumber">
                                                                                                                                            </telerik:GridBoundColumn>
                                                                                                                                        </Columns>
                                                                                                                                        <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                                                                        <PagerStyle AlwaysVisible="false"></PagerStyle>
                                                                                                                                    </MasterTableView>
                                                                                                                                </telerik:RadGrid>
                                                                                                                            </telerik:RadPageView>
                                                                                                                            <telerik:RadPageView ID="rpvEmails" runat="server">
                                                                                                                                <telerik:RadGrid ID="rgrdEmails" runat="server" AutoGenerateColumns="false" 
                                                                                                                                    AllowSorting="true" AllowMultiRowSelection="false" AllowPaging="true" 
                                                                                                                                    ShowFooter="false" Skin="WebBlue" PageSize="5" OnNeedDataSource="rgrdEMails_NeedDataSource">
                                                                                                                                    <MasterTableView Width="100%" DataKeyNames="ContactID" AllowMultiColumnSorting="true">
                                                                                                                                        <Columns>
                                                                                                                                            <telerik:GridBoundColumn SortExpression="ContactID" HeaderText="ContactID" HeaderButtonType="TextButton"
                                                                                                                                                    DataField="ContactID" Visible="false" >
                                                                                                                                            </telerik:GridBoundColumn>
                                                                                                                                            <telerik:GridBoundColumn SortExpression="EMail" HeaderText="EMail" HeaderButtonType="TextButton" 
                                                                                                                                                DataField="EMail">
                                                                                                                                            </telerik:GridBoundColumn>
                                                                                                                                        </Columns>
                                                                                                                                        <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                                                                        <PagerStyle AlwaysVisible="false"></PagerStyle>
                                                                                                                                    </MasterTableView>
                                                                                                                                </telerik:RadGrid>
                                                                                                                            </telerik:RadPageView>
                                                                                                                        </telerik:RadMultiPage>
                                                                                                                    </telerik:RadAjaxPanel>
                                                                                                                </NestedViewTemplate>
                                                                                                            </MasterTableView>
                                                                                                        </telerik:RadGrid>
                                                                                                    </telerik:RadPageView>
                                                                                                    <telerik:RadPageView ID="rpvOrders" runat="server">
                                                                                                        <telerik:RadGrid ID="rgrdOrders" runat="server" AutoGenerateColumns="False"
                                                                                                            AllowSorting="true" AllowMultiRowSelection="False" AllowPaging="true"
                                                                                                            ShowFooter="False" Skin="WebBlue" Pagesize="5" OnNeedDataSource="rgrdOrders_NeedDataSource" OnItemCreated="rgrdOrders_ItemCreated">
                                                                                                            <FooterStyle BorderStyle="Solid" />
                                                                                                            <MasterTableView Width="100%" DataKeyNames="OrderNumType" AllowMultiColumnSorting="True" ItemStyle-HorizontalAlign="Justify"  ItemStyle-VerticalAlign="Middle" >
                                                                                                                <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
                                                                                                                <Columns>
                                                                                                                    <telerik:GridBoundColumn SortExpression="OrderNumType" HeaderText="OrderNumType" HeaderButtonType="TextButton"
                                                                                                                        DataField="OrderNumType" Visible="false" >
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="OrderNum" HeaderText="Order #" HeaderButtonType="TextButton"
                                                                                                                        DataField="OrderNum">
                                                                                                                    </telerik:GridBoundColumn
                                                                                                                    <telerik:GridBoundColumn SortExpression="OrderType" HeaderText="Type" HeaderButtonType="TextButton"
                                                                                                                        DataField="OrderType" >
                                                                                                                    </telerik:GridBoundColumn
                                                                                                                    <telerik:GridDateTimeColumn SortExpression="StartDate" HeaderText="Lifetime Start Date" HeaderButtonType="TextButton"
                                                                                                                        DataField="StartDate" DataFormatString="{0:MM/dd/yyyy}">
                                                                                                                    </telerik:GridDateTimeColumn>
                                                                                                                    <telerik:GridDateTimeColumn SortExpression="EndDate" HeaderText="Lifetime End Date" HeaderButtonType="TextButton"
                                                                                                                        DataField="EndDate" DataFormatString="{0:MM/dd/yyyy}">
                                                                                                                    </telerik:GridDateTimeColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="OrderRM" HeaderText="Selling RM #" HeaderButtonType="TextButton"
                                                                                                                        DataField="OrderRM">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="RMName" HeaderText="Selling RM Name" HeaderButtonType="TextButton"
                                                                                                                        DataField="RMName">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="ECSPCSBoth" HeaderText="E/P/B" HeaderButtonType="TextButton"
                                                                                                                        DataField="ECSPCSBoth">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridBoundColumn SortExpression="MnthlySubscripValue" HeaderText="Monthly Subscrip. $" HeaderButtonType="TextButton"
                                                                                                                        DataField="MnthlySubscripValue">
                                                                                                                    </telerik:GridBoundColumn>
                                                                                                                    <telerik:GridTemplateColumn UniqueName="ViewOrderColumn" HeaderText="View">
                                                                                                                        <ItemTemplate>
                                                                                                                            <asp:HyperLink ID="ViewLink" runat="server" Text="View"></asp:HyperLink>
                                                                                                                            </ItemTemplate>
                                                                                                                    </telerik:GridTemplateColumn>
                                                                                                                    <telerik:GridTemplateColumn UniqueName="ValidateOrderColumn" HeaderText="Validate">
                                                                                                                        <ItemTemplate>
                                                                                                                            <asp:HyperLink ID="ValidationLink" runat="server" Text="Validate"></asp:HyperLink>
                                                                                                                            </ItemTemplate>
                                                                                                                    </telerik:GridTemplateColumn>
                                                                                                                </Columns>
                                                                                                                <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                                                <PagerStyle AlwaysVisible="false" />
                                                                                                            </MasterTableView>
                                                                                                        </telerik:RadGrid>
                                                                                                    </telerik:RadPageView>
                                                                                                </telerik:RadMultiPage>
                                                                                            </telerik:RadAjaxPanel>
                                                                                         </NestedViewTemplate>
                                                                                    </MasterTableView>
                                                                                </telerik:RadGrid>
                                                                            </telerik:RadAjaxPanel>
                                                                        </NestedViewTemplate>
                                                                    </MasterTableView>
                                                            </telerik:RadGrid>
                                                        </telerik:RadPageView>
                                                        <telerik:RadPageView ID="rpvCMTContacts" runat="server">
                                                            <telerik:RadGrid ID="rgrdCMTContacts" runat="server" AllowSorting="true" AllowMultiRowSelection="false" AutoGenerateColumns="False"
                                                                AllowPaging="true" Skin="WebBlue" PageSize="5" OnNeedDataSource="rgrdCMTContacts_NeedDataSource"
                                                                OnItemCommand="rgrdCMTContacts_ItemCommand" >
                                                                <MasterTableView Width="100%" DataKeyNames="ContactID" AllowMultiColumnSorting="true" >
                                                                    <Columns>
                                                                        <telerik:GridBoundColumn SortExpression="ContactID" HeaderText="ContactID" HeaderButtonType="TextButton" DataField="ContactID" Visible="false" >
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="FirstName" HeaderText="FirstName" HeaderButtonType="TextButton" DataField="FirstName">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="LastName" HeaderText="LastName" HeaderButtonType="TextButton" DataField="LastName">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="Title" HeaderText="Title" HeaderButtonType="TextButton" DataField="Title">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="Description" HeaderText="Description" HeaderButtonType="TextButton" DataField="Description">
                                                                        </telerik:GridBoundColumn>
                                                                    </Columns>
                                                                    <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                    <PagerStyle AlwaysVisible="false"></PagerStyle>
                                                                    <NestedViewSettings >
                                                                        <ParentTableRelation >
                                                                            <telerik:GridRelationFields DetailKeyField="ContactID" MasterKeyField="ContactID" />
                                                                        </ParentTableRelation>
                                                                    </NestedViewSettings>
                                                                    <NestedViewTemplate>
                                                                        <telerik:RadAjaxPanel ID="InnerPanelCMTContacts" runat="server" Visible="false" >
                                                                             <telerik:RadTabStrip ID="rtbCMTContacts" runat="server" MultiPageID="rmpCMTContacts" SelectedIndex="1">
                                                                                <Tabs>
                                                                                    <telerik:RadTab runat="server" Text="Phone List" PageViewID ="rpvCMTPhones"></telerik:RadTab>
                                                                                    <telerik:RadTab runat="server" Text="EMail List" PageViewID ="rpvCMTEmails"></telerik:RadTab>
                                                                                </Tabs>
                                                                            </telerik:RadTabStrip
                                                                            <telerik:RadMultiPage ID="rmpCMTContacts" runat="server">
                                                                                <telerik:RadPageView ID="rpvCMTPhones" runat="server">
                                                                                    <telerik:RadGrid ID="rgrdCMTPhones" runat="server" AutoGenerateColumns="false" 
                                                                                        AllowSorting="true" AllowMultiRowSelection="false" AllowPaging="true" 
                                                                                        ShowFooter="false" Skin="WebBlue" PageSize="5" OnNeedDataSource="rgrdPhones_NeedDataSource">
                                                                                        <MasterTableView Width="100%" DataKeyNames="ContactID" AllowMultiColumnSorting="true">
                                                                                            <Columns>
                                                                                                <telerik:GridBoundColumn SortExpression="ContactID" HeaderText="ContactID" HeaderButtonType="TextButton"
                                                                                                        DataField="ContactID" Visible="false" >
                                                                                                </telerik:GridBoundColumn>
                                                                                                <telerik:GridBoundColumn SortExpression="PhoneType" HeaderText="PhoneType" HeaderButtonType="TextButton" 
                                                                                                    DataField="PhoneType">
                                                                                                </telerik:GridBoundColumn>
                                                                                                <telerik:GridBoundColumn SortExpression="AreaCode" HeaderText="AreaCode" HeaderButtonType="TextButton" 
                                                                                                    DataField="AreaCode">
                                                                                                </telerik:GridBoundColumn>
                                                                                                <telerik:GridBoundColumn SortExpression="PhoneNumber" HeaderText="PhoneNumber" HeaderButtonType="TextButton" 
                                                                                                    DataField="PhoneNumber">
                                                                                                </telerik:GridBoundColumn>
                                                                                            </Columns>
                                                                                            <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                            <PagerStyle AlwaysVisible="false"></PagerStyle>
                                                                                        </MasterTableView>
                                                                                    </telerik:RadGrid>
                                                                                </telerik:RadPageView>
                                                                                <telerik:RadPageView ID="rpvCMTEmails" runat="server">
                                                                                    <telerik:RadGrid ID="rgrdCMTEmails" runat="server" AutoGenerateColumns="false" 
                                                                                        AllowSorting="true" AllowMultiRowSelection="false" AllowPaging="true" 
                                                                                        ShowFooter="false" Skin="WebBlue" PageSize="5" OnNeedDataSource="rgrdEMails_NeedDataSource">
                                                                                        <MasterTableView Width="100%" DataKeyNames="ContactID" AllowMultiColumnSorting="true">
                                                                                            <Columns>
                                                                                                <telerik:GridBoundColumn SortExpression="ContactID" HeaderText="ContactID" HeaderButtonType="TextButton"
                                                                                                        DataField="ContactID" Visible="false" >
                                                                                                </telerik:GridBoundColumn>
                                                                                                <telerik:GridBoundColumn SortExpression="EMail" HeaderText="EMail" HeaderButtonType="TextButton" 
                                                                                                    DataField="EMail">
                                                                                                </telerik:GridBoundColumn>
                                                                                            </Columns>
                                                                                            <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                                            <PagerStyle AlwaysVisible="false"></PagerStyle>
                                                                                        </MasterTableView>
                                                                                    </telerik:RadGrid>
                                                                                </telerik:RadPageView>
                                                                            </telerik:RadMultiPage>
                                                                        </telerik:RadAjaxPanel>
                                                                    </NestedViewTemplate>
                                                                </MasterTableView>
                                                            </telerik:RadGrid>
                                                        </telerik:RadPageView>
                                                        <telerik:RadPageView ID="rpvCMTOrders" runat="server" >
                                                            <telerik:RadGrid ID="rgrdCMTOrders" runat="server" AutoGenerateColumns="False"
                                                                AllowSorting="true" AllowMultiRowSelection="False" AllowPaging="true"
                                                                ShowFooter="False" Skin="WebBlue" Pagesize="5" OnNeedDataSource="rgrdOrders_NeedDataSource"
                                                                OnItemCreated="rgrdCMTOrders_ItemCreated">
                                                                <FooterStyle BorderStyle="Solid" />
                                                                <MasterTableView Width="100%" DataKeyNames="OrderNumType" AllowMultiColumnSorting="True">
                                                                    <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn>
                                                                    <Columns>
                                                                        <telerik:GridBoundColumn SortExpression="OrderNumType" HeaderText="OrderNumType" HeaderButtonType="TextButton"
                                                                            DataField="OrderNumType" Visible="false" >
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="OrderNum" HeaderText="Order #" HeaderButtonType="TextButton"
                                                                            DataField="OrderNum">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="OrderType" HeaderText="Type" HeaderButtonType="TextButton"
                                                                            DataField="OrderType" >
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridDateTimeColumn  SortExpression="StartDate" HeaderText="Lifetime Start Date" HeaderButtonType="TextButton"
                                                                            DataField="StartDate" DataFormatString="{0:MM/dd/yyyy}">
                                                                        </telerik:GridDateTimeColumn
                                                                        <telerik:GridDateTimeColumn  SortExpression="EndDate" HeaderText="Lifetime End Date" HeaderButtonType="TextButton"
                                                                            DataField="EndDate" DataFormatString="{0:MM/dd/yyyy}">
                                                                        </telerik:GridDateTimeColumn
                                                                        <telerik:GridBoundColumn SortExpression="OrderRM" HeaderText="Selling RM #" HeaderButtonType="TextButton"
                                                                            DataField="OrderRM">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="RMName" HeaderText="Selling RM Name" HeaderButtonType="TextButton"
                                                                            DataField="RMName">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="ECSPCSBoth" HeaderText="E/P/B" HeaderButtonType="TextButton"
                                                                            DataField="ECSPCSBoth">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridBoundColumn SortExpression="MnthlySubscripValue" HeaderText="Monthly Subscrip. $" HeaderButtonType="TextButton"
                                                                            DataField="MnthlySubscripValue">
                                                                        </telerik:GridBoundColumn>
                                                                        <telerik:GridTemplateColumn UniqueName="ViewOrderColumn" HeaderText="View">
                                                                            <ItemTemplate>
                                                                                <asp:HyperLink ID="CMTViewLink" runat="server" Text="View"></asp:HyperLink>
                                                                                </ItemTemplate>
                                                                        </telerik:GridTemplateColumn>
                                                                        <telerik:GridTemplateColumn UniqueName="ValidateOrderColumn" HeaderText="Validate">
                                                                            <ItemTemplate>
                                                                                <asp:HyperLink ID="CMTValidationLink" runat="server" Text="Validate"></asp:HyperLink>
                                                                                </ItemTemplate>
                                                                        </telerik:GridTemplateColumn>
                                                                    </Columns>
                                                                    <ItemStyle HorizontalAlign="Justify" VerticalAlign="Middle" ></ItemStyle>
                                                                    <PagerStyle AlwaysVisible="false" />
                                                                </MasterTableView>
                                                            </telerik:RadGrid>
                                                        </telerik:RadPageView>
                                                    </telerik:RadMultiPage>
                                               </telerik:RadAjaxPanel>
                                             </NestedViewTemplate>
                                        </MasterTableView>
                                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </telerik:RadGrid>
                        </telerik:RadPane>
                    </telerik:RadSplitter>
            </ContentTemplate>
        </asp:UpdatePanel>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" VisibleStatusbar="false" ReloadOnShow="true" EnableShadow="true" 
                ShowContentDuringLoad="false" Animation="Slide" Opacity="90" AutoSize="True" Modal="False" EnableEmbeddedSkins="True" Skin="Telerik">
        </telerik:RadWindowManager>
    </asp:Content>

    Code behind in C#
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Configuration;
    using System.Data;
    using System.Data.SqlClient;
    using System.Drawing;
    using System.Web;
    using System.Web.SessionState;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;
    using Telerik.Web.UI;
    using System.Net.Mail;
    using System.Collections.Generic;
    using System.Text;
    using System.Reflection;
      
    namespace ECSMT
    {
        public partial class _Default : System.Web.UI.Page
        {
            private Marlin.Common.User.cUser mcUserInfo;
      
            protected void Page_Load(object sender, EventArgs e)
            {
                MethodBase lmth = MethodBase.GetCurrentMethod();
                string lsRoutineName = lmth.DeclaringType + "." + lmth.Name;
                mcUserInfo = (Marlin.Common.User.cUser)HttpContext.Current.Session["UserInfo"];
                Session["BindgrdCMT"] = "No";
                  
                try
                {
                    if (!IsPostBack)
                    {
                        //    LoadrcmbCMTNum();
                        RadWindowManager1.Behavior = Telerik.Web.UI.WindowBehaviors.Maximize | Telerik.Web.UI.WindowBehaviors.Minimize | Telerik.Web.UI.WindowBehaviors.Close | Telerik.Web.UI.WindowBehaviors.Move | Telerik.Web.UI.WindowBehaviors.Resize | Telerik.Web.UI.WindowBehaviors.Pin | Telerik.Web.UI.WindowBehaviors.Default;
                    }
                }
                catch (Exception ex)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(ex, lsRoutineName, Session["UserName"].ToString());
                }
            }
      
            protected void grdCMT_PageSizeChanged(object source, GridCommandEventArgs e)
            {
                Session["BindgrdCMT"] = "Yes";
            }
      
            protected void grdCMT_ItemCommand(object source, GridCommandEventArgs e)
            {
                if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && !e.Item.Expanded)
                {
                    RadAjaxPanel rpInnerPanel1;
                    rpInnerPanel1 = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanel1");
                    rpInnerPanel1.Visible = true;
                    RadMultiPage rmMultiPage1 = (RadMultiPage)(rpInnerPanel1.FindControl("RadMultiPage1"));
                      
                    RadPageView rpvInstalls = (RadPageView)(rmMultiPage1.FindControl("rpvInstalls"));
                    RadGrid rgInstalls = (RadGrid)(rpvInstalls.FindControl("rgrdInstalls"));
                    rgInstalls.Rebind();
      
                    RadPageView rpvAddress = (RadPageView)(rmMultiPage1.FindControl("rpvAddress"));
                    RadGrid rgAddress = (RadGrid)(rpvAddress.FindControl("grdAddress"));
                    rgAddress.Rebind();
      
                    RadPageView rpvCMTContacts = (RadPageView)(rmMultiPage1.FindControl("rpvCMTContacts"));
                    RadGrid rgrdCMTContacts = (RadGrid)(rpvCMTContacts.FindControl("rgrdCMTContacts"));
                    rgrdCMTContacts.Rebind();
      
                    RadPageView rpvCMTOrders = (RadPageView)(rmMultiPage1.FindControl("rpvCMTOrders"));
                    RadGrid rgrdCMTOrders = (RadGrid)(rpvCMTOrders.FindControl("rgrdCMTOrders"));
                    rgrdCMTOrders.Rebind();
                }
                else if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && e.Item.Expanded)
                {
                    RadAjaxPanel rpInnerPanel1;
                    rpInnerPanel1 = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanel1");
                    rpInnerPanel1.Visible = false;
                }
                else if (e.CommandName == RadGrid.SortCommandName)
                {
                    Session["BindgrdCMT"] = "Yes";
                }
            }
      
            protected void grdInstalls_ItemCommand(object source, GridCommandEventArgs e)
            {
                if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && !e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanelInstalls;
                    InnerPanelInstalls = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanelInstalls");
                    InnerPanelInstalls.Visible = true;
      
                    RadMultiPage rmpInstalls = (RadMultiPage)(InnerPanelInstalls.FindControl("rmpInstalls"));
      
                    RadPageView rpvInstContacts = (RadPageView)(rmpInstalls.FindControl("rpvInstContacts"));
                    RadGrid rgrdInstContacts = (RadGrid)(rpvInstContacts.FindControl("rgrdInstContacts"));
                    rgrdInstContacts.Rebind();
      
                    RadPageView rpvInstOrders = (RadPageView)(rmpInstalls.FindControl("rpvInstOrders"));
                    RadGrid rgrdInstOrders = (RadGrid)(rpvInstOrders.FindControl("rgrdInstOrders"));
                    rgrdInstOrders.Rebind();
      
                    RadPageView rpvInstEquipment = (RadPageView)(rmpInstalls.FindControl("rpvInstEquipment"));
                    RadGrid rgrdInstEquipment = (RadGrid)(rpvInstEquipment.FindControl("rgrdInstEquipment"));
                    rgrdInstEquipment.Rebind();
                }
                else if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanelInstalls;
                    InnerPanelInstalls = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanelInstalls");
                    InnerPanelInstalls.Visible = false;
                }
            }
      
            protected void rgrdInstContacts_ItemCommand(object source, GridCommandEventArgs e)
            {
                if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && !e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanelInstContacts;
                    InnerPanelInstContacts = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanelInstContacts");
                    InnerPanelInstContacts.Visible = true;
      
                    RadMultiPage rmpInstContacts = (RadMultiPage)(InnerPanelInstContacts.FindControl("rmpInstContacts"));
      
                    RadPageView rpvInstPhones = (RadPageView)(rmpInstContacts.FindControl("rpvInstPhones"));
                    RadGrid rgrdInstPhones = (RadGrid)(rpvInstPhones.FindControl("rgrdInstPhones"));
                    rgrdInstPhones.Rebind();
      
                    RadPageView rpvInstEmails = (RadPageView)(rmpInstContacts.FindControl("rpvInstEmails"));
                    RadGrid rgrdInstEmails = (RadGrid)(rpvInstEmails.FindControl("rgrdInstEmails"));
                    rgrdInstEmails.Rebind();
                }
                else if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanelInstContacts;
                    InnerPanelInstContacts = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanelInstContacts");
                    InnerPanelInstContacts.Visible = false;
                }
            }
      
            protected void grdAddress_ItemCommand(object source, GridCommandEventArgs e)
            {
                if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && !e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanel2;
                    InnerPanel2 = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanel2");
                    InnerPanel2.Visible = true;
                    RadGrid grdAddresses = (RadGrid)(InnerPanel2.FindControl("grdAddresses"));
                    grdAddresses.Rebind();
                }
                else if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanel2;
                    InnerPanel2 = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanel2");
                    InnerPanel2.Visible = false;
                }
            }
      
            protected void grdAddresses_ItemCommand(object source, GridCommandEventArgs e)
            {
                if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && !e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanel3;
                    InnerPanel3 = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanel3");
                    InnerPanel3.Visible = true;
      
                    RadMultiPage RadMultiPage2 = (RadMultiPage)(InnerPanel3.FindControl("RadMultiPage2"));
      
                    RadPageView rpvContacts = (RadPageView)(RadMultiPage2.FindControl("rpvContacts"));
                    RadGrid rgrdContacts = (RadGrid)(rpvContacts.FindControl("rgrdContacts"));
                    rgrdContacts.Rebind();
      
                    RadPageView rpvOrders = (RadPageView)(RadMultiPage2.FindControl("rpvOrders"));
                    RadGrid rgrdOrders = (RadGrid)(rpvOrders.FindControl("rgrdOrders"));
                    rgrdOrders.Rebind();
                }
                else if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanel3;
                    InnerPanel3 = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanel3");
                    InnerPanel3.Visible = false;
                }
            }
      
            protected void rgrdContacts_ItemCommand(object source, GridCommandEventArgs e)
            {
                if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && !e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanelContacts;
                    InnerPanelContacts = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanelContacts");
                    InnerPanelContacts.Visible = true;
      
                    RadMultiPage rmpContacts = (RadMultiPage)(InnerPanelContacts.FindControl("rmpContacts"));
      
                    RadPageView rpvPhones = (RadPageView)(rmpContacts.FindControl("rpvPhones"));
                    RadGrid rgrdPhones = (RadGrid)(rpvPhones.FindControl("rgrdPhones"));
                    rgrdPhones.Rebind();
      
                    RadPageView rpvEmails = (RadPageView)(rmpContacts.FindControl("rpvOrders"));
                    RadGrid rgrdEmails = (RadGrid)(rpvEmails.FindControl("rgrdEmails"));
                    rgrdEmails.Rebind();
                }
                else if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanelContacts;
                    InnerPanelContacts = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanelContacts");
                    InnerPanelContacts.Visible = false;
                }
            }
      
            protected void rgrdCMTContacts_ItemCommand(object source, GridCommandEventArgs e)
            {
                if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && !e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanelCMTContacts;
                    InnerPanelCMTContacts = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanelCMTContacts");
                    InnerPanelCMTContacts.Visible = true;
      
                    RadMultiPage rmpCMTContacts = (RadMultiPage)(InnerPanelCMTContacts.FindControl("rmpCMTContacts"));
      
                    RadPageView rpvCMTPhones = (RadPageView)(rmpCMTContacts.FindControl("rpvCMTPhones"));
                    RadGrid rgrdCMTPhones = (RadGrid)(rpvCMTPhones.FindControl("rgrdCMTPhones"));
                    rgrdCMTPhones.Rebind();
      
                    RadPageView rpvCMTEmails = (RadPageView)(rmpCMTContacts.FindControl("rpvCMTEmails"));
                    RadGrid rgrdCMTEmails = (RadGrid)(rpvCMTEmails.FindControl("rgrdCMTEmails"));
                    rgrdCMTEmails.Rebind();
                }
                else if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem && e.Item.Expanded)
                {
                    RadAjaxPanel InnerPanelCMTContacts;
                    InnerPanelCMTContacts = (RadAjaxPanel)((GridDataItem)e.Item).ChildItem.FindControl("InnerPanelCMTContacts");
                    InnerPanelCMTContacts.Visible = false;
                }
            }
      
            protected void grdCMT_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
            {
                if (Session["BindgrdCMT"] == "Yes" || !IsPostBack)
                {
                    MethodBase lmth = MethodBase.GetCurrentMethod();
                    string lsRoutineName = lmth.DeclaringType + "." + lmth.Name;
                    SqlConnection lconn = new SqlConnection(ConfigurationManager.ConnectionStrings["JDECommon"].ConnectionString);
                    SqlCommand lcmd = new SqlCommand();
                    lcmd.CommandTimeout = 600;
                  
                    lcmd.CommandType = CommandType.StoredProcedure;
                    lcmd.Connection = lconn;
                    lcmd.Parameters.Add(new SqlParameter("@Sys", "JDERT"));
                    lcmd.Parameters.Add(new SqlParameter("@strWho", mcUserInfo.LoginName.ToUpper()));
      
                    if (!IsPostBack)
                    {
                        lcmd.CommandText = "dbo.uspGetCMTInformationByCustomerNameCityState";
                        lcmd.Parameters.Add(new SqlParameter("@strCustName", "Retrun Nothing"));
                    }
                    else
                    {
      
                        if (rtxtCMT.Text.Trim().Length > 0)
                        {
                            lcmd.CommandText = "dbo.uspGetCMTInformationByCMTNum";
                            lcmd.Parameters.Add(new SqlParameter("@intCMTNumber", Convert.ToInt32(rtxtCMT.Text.ToString().Trim())));
                        }
                        else if (rtxtJDENum.Text.Trim().Length > 0)
                        {
                            lcmd.CommandText = "dbo.uspGetCMTInformationByJDENum";
                            lcmd.Parameters.Add(new SqlParameter("@intJDENumber", Convert.ToInt32(rtxtJDENum.Text.ToString().Trim())));
                        }
                        else if (rtxtOrderNum.Text.Trim().Length > 0)
                        {
                            lcmd.CommandText = "dbo.uspGetCMTInformationByOrderNumber";
                            lcmd.Parameters.Add(new SqlParameter("@intOrderNumber", Convert.ToInt32(rtxtOrderNum.Text.ToString().Trim())));
                        }
                        else if (rtxtGP.Text.Trim().Length > 0)
                        {
                            lcmd.CommandText = "dbo.uspGetCMTInformationByGPNum";
                            lcmd.Parameters.Add(new SqlParameter("@strGPNumber", Convert.ToInt32(rtxtGP.Text.ToString().Trim())));
                        }
                        else if (rtxtTracking.Text.Trim().Length > 0)
                        {
                            lcmd.CommandText = "dbo.uspGetCMTInformationByTrackingNum";
                            lcmd.Parameters.Add(new SqlParameter("@strTrackingNum", Convert.ToInt32(rtxtTracking.Text.ToString().Trim())));
                        }
                        else
                        {
                            if ((rtxtCustUser.Text.Trim().Length == 0) && (rtxtEmail.Text.Trim().Length == 0) && (rtxtPhone.Text.Trim().Length == 0) && (rtxtTerr.Text.Trim().Length == 0))
                            {
                                lcmd.CommandText = "dbo.uspGetCMTInformationByCustomerNameCityState";
                            }
                            else
                            {
                                lcmd.CommandText = "dbo.uspGetCMTInformationByCustomerName";
                            }
      
                            if (rtxtCompanyName.Text.Trim().Length > 0)
                            {
                                lcmd.Parameters.Add(new SqlParameter("@strCustName", rtxtCompanyName.Text.ToString().Trim()));
                            }
                            if (rtxtCity.Text.Trim().Length > 0)
                            {
                                lcmd.Parameters.Add(new SqlParameter("@strCity", rtxtCity.Text.ToString().Trim()));
                            }
                            if (rtxtState.Text.Trim().Length > 0)
                            {
                                lcmd.Parameters.Add(new SqlParameter("@strState", rtxtState.Text.ToString().Trim()));
                            }
      
                            if (rtxtTerr.Text.Trim().Length > 0)
                            {
                                lcmd.Parameters.Add(new SqlParameter("@strTerr", rtxtTerr.Text.ToString().Trim()));
                            }
                            if (rtxtEmail.Text.Trim().Length > 0)
                            {
                                lcmd.Parameters.Add(new SqlParameter("@strEmail", rtxtEmail.Text.ToString().Trim()));
                            }
                            if (this.rtxtCustUser.Text.Trim().Length > 0)
                            {
                                lcmd.Parameters.Add(new SqlParameter("@strCustUser", rtxtCustUser.Text.ToString().Trim()));
                            }
                            if (this.rtxtPhone.Text.Trim().Length > 0)
                            {
                                lcmd.Parameters.Add(new SqlParameter("@strPhone", rtxtPhone.Text.ToString().Trim()));
                            }
                        }
                    }
                    SqlDataAdapter ldsa = new SqlDataAdapter(lcmd);
                    DataTable ldt = new DataTable();
                    try
                    {
                        lconn.Open();
                        ldsa.Fill(ldt);
                        grdCMT.DataSource = ldt;
                        if (ldt.Rows.Count <= 0)
                        {
                            grdCMT.Enabled = false;
                        }
                        else
                        {
                            grdCMT.Enabled = true;
                        }   
                    }
                    catch (SqlException exSQL)
                    {
                        Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                        lobjError.ProcessError(exSQL, lsRoutineName, lcmd, Session["UserName"].ToString());
                    }
                    catch (Exception ex)
                    {
                        Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                        lobjError.ProcessError(ex, lsRoutineName, Session["UserName"].ToString());
                    }
                    finally
                    {
                        lconn.Close();
                        Session["BindgrdCMT"] = "No";
                    }
                }
            }
      
            protected void grdAddress_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
            {
                MethodBase lmth = MethodBase.GetCurrentMethod();
                string lsRoutineName = lmth.DeclaringType + "." + lmth.Name;
                SqlConnection lconn = new SqlConnection(ConfigurationManager.ConnectionStrings["JDECommon"].ConnectionString);
      
                RadGrid nestedgrid = (RadGrid)source;
                GridNestedViewItem dataItem = (GridNestedViewItem)nestedgrid.NamingContainer;
                GridDataItem parentItem = dataItem.ParentItem;
                int intCustID = Convert.ToInt32(parentItem.GetDataKeyValue("CustomerNumber").ToString());  
      
                SqlCommand lcmd = new SqlCommand();
                lcmd.CommandTimeout = 600;
                lcmd.CommandText = "dbo.uspGetActiveInactiveCountsByCMT";
                lcmd.CommandType = CommandType.StoredProcedure;
                lcmd.Connection = lconn;
                lcmd.Parameters.Add(new SqlParameter("@Sys", "JDERT"));
                lcmd.Parameters.Add(new SqlParameter("@strWho", mcUserInfo.LoginName.ToUpper()));
                lcmd.Parameters.Add(new SqlParameter("@intCMT", intCustID));
                SqlDataAdapter ldsa = new SqlDataAdapter(lcmd);
                DataTable ldt = new DataTable();
                try
                {
                    lconn.Open();
                    ldsa.Fill(ldt);
                    nestedgrid.DataSource = ldt;
                }
                catch (SqlException exSQL)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(exSQL, lsRoutineName, lcmd, Session["UserName"].ToString());
                }
                catch (Exception ex)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(ex, lsRoutineName, Session["UserName"].ToString());
                }
                finally
                {
                    lconn.Close();
                }
      
            }
              
            protected void grdInstalls_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
            {
                MethodBase lmth = MethodBase.GetCurrentMethod();
                string lsRoutineName = lmth.DeclaringType + "." + lmth.Name;
                SqlConnection lconn = new SqlConnection(ConfigurationManager.ConnectionStrings["JDECommon"].ConnectionString);
      
                RadGrid nestedgrid = (RadGrid)source;
                GridNestedViewItem dataItem = (GridNestedViewItem)nestedgrid.NamingContainer;
                GridDataItem parentItem = dataItem.ParentItem;
                int intCustID = Convert.ToInt32(parentItem.GetDataKeyValue("CustomerNumber").ToString());
      
                SqlCommand lcmd = new SqlCommand();
                lcmd.CommandTimeout = 600;
                lcmd.CommandText = "dbo.uspGetInstallInfoForECSMTGridByCMTNum";
                lcmd.CommandType = CommandType.StoredProcedure;
                lcmd.Connection = lconn;
                lcmd.Parameters.Add(new SqlParameter("@Sys", "JDERT"));
                lcmd.Parameters.Add(new SqlParameter("@strWho", mcUserInfo.LoginName.ToUpper()));
                lcmd.Parameters.Add(new SqlParameter("@intAN8", intCustID));
                SqlDataAdapter ldsa = new SqlDataAdapter(lcmd);
                DataTable ldt = new DataTable();
                try
                {
                    lconn.Open();
                    ldsa.Fill(ldt);
                    nestedgrid.DataSource = ldt;
                }
                catch (SqlException exSQL)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(exSQL, lsRoutineName, lcmd, Session["UserName"].ToString());
                }
                catch (Exception ex)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(ex, lsRoutineName, Session["UserName"].ToString());
                }
                finally
                {
                    lconn.Close();
                }
      
            }
      
            protected void grdAddresses_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
            {
                MethodBase lmth = MethodBase.GetCurrentMethod();
                string lsRoutineName = lmth.DeclaringType + "." + lmth.Name;
                SqlConnection lconn = new SqlConnection(ConfigurationManager.ConnectionStrings["JDECommon"].ConnectionString);
      
                RadGrid nestedgrid = (RadGrid)source;
                GridNestedViewItem dataItem = (GridNestedViewItem)nestedgrid.NamingContainer;
                GridDataItem parentItem = dataItem.ParentItem;
                string strCustInfo = parentItem.GetDataKeyValue("CustNumAndType").ToString();
                int intDash = strCustInfo.IndexOf("-", 0);
                string strCustID = "";
                string strCustType = "";
                strCustID = strCustInfo.Substring(0, intDash);
                strCustType = strCustInfo.Substring(intDash + 1);
                int intCustID = Convert.ToInt32(strCustID);
      
                SqlCommand lcmd = new SqlCommand();
                lcmd.CommandTimeout = 600;
                lcmd.CommandText = "dbo.uspGetAddressInfoForECSMTGridByCMTNumAndAddresssType";
                lcmd.CommandType = CommandType.StoredProcedure;
                lcmd.Connection = lconn;
                lcmd.Parameters.Add(new SqlParameter("@Sys", "JDERT"));
                lcmd.Parameters.Add(new SqlParameter("@strWho", mcUserInfo.LoginName.ToUpper()));
                lcmd.Parameters.Add(new SqlParameter("@intAN8", intCustID));
                lcmd.Parameters.Add(new SqlParameter("@strType", strCustType));
                SqlDataAdapter ldsa = new SqlDataAdapter(lcmd);
                DataTable ldt = new DataTable();
                try
                {
                    lconn.Open();
                    ldsa.Fill(ldt);
                    nestedgrid.DataSource = ldt;
                }
                catch (SqlException exSQL)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(exSQL, lsRoutineName, lcmd, Session["UserName"].ToString());
                }
                catch (Exception ex)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(ex, lsRoutineName, Session["UserName"].ToString());
                }
                finally
                {
                    lconn.Close();
                }
      
            }
      
            protected void rgrdOrders_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
            {
                MethodBase lmth = MethodBase.GetCurrentMethod();
                string lsRoutineName = lmth.DeclaringType + "." + lmth.Name;
                SqlConnection lconn = new SqlConnection(ConfigurationManager.ConnectionStrings["JDECommon"].ConnectionString);
      
                RadGrid nestedgrid = (RadGrid)source;
                GridNestedViewItem dataItem = (GridNestedViewItem)nestedgrid.NamingContainer;
                GridDataItem parentItem = dataItem.ParentItem;
                string strCustInfo = parentItem.GetDataKeyValue("CustomerNumber").ToString();
                int intCustID = Convert.ToInt32(strCustInfo);
      
                SqlCommand lcmd = new SqlCommand();
                lcmd.CommandTimeout = 600;
                lcmd.CommandText = "dbo.uspGetOrderInfoForECSMTByAN8";
                lcmd.CommandType = CommandType.StoredProcedure;
                lcmd.Connection = lconn;
                lcmd.Parameters.Add(new SqlParameter("@Sys", "JDERT"));
                lcmd.Parameters.Add(new SqlParameter("@strWho", mcUserInfo.LoginName.ToUpper()));
                lcmd.Parameters.Add(new SqlParameter("@intAN8", intCustID));
                SqlDataAdapter ldsa = new SqlDataAdapter(lcmd);
                DataTable ldt = new DataTable();
                try
                {
                    lconn.Open();
                    ldsa.Fill(ldt);
                    nestedgrid.DataSource = ldt;
                }
                catch (SqlException exSQL)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(exSQL, lsRoutineName, lcmd, Session["UserName"].ToString());
                }
                catch (Exception ex)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(ex, lsRoutineName, Session["UserName"].ToString());
                }
                finally
                {
                    lconn.Close();
                }
      
            }
      
            protected void rgrdCMTContacts_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
            {
                MethodBase lmth = MethodBase.GetCurrentMethod();
                string lsRoutineName = lmth.DeclaringType + "." + lmth.Name;
                SqlConnection lconn = new SqlConnection(ConfigurationManager.ConnectionStrings["JDECommon"].ConnectionString);
      
                RadGrid nestedgrid = (RadGrid)source;
                GridNestedViewItem dataItem = (GridNestedViewItem)nestedgrid.NamingContainer;
                GridDataItem parentItem = dataItem.ParentItem;
                string strCustInfo = parentItem.GetDataKeyValue("CustomerNumber").ToString();
                int intCustID = Convert.ToInt32(strCustInfo);
      
                SqlCommand lcmd = new SqlCommand();
                lcmd.CommandTimeout = 600;
                lcmd.CommandText = "dbo.uspGetContactInfoForECSMTByCMT";
                lcmd.CommandType = CommandType.StoredProcedure;
                lcmd.Connection = lconn;
                lcmd.Parameters.Add(new SqlParameter("@Sys", "JDERT"));
                lcmd.Parameters.Add(new SqlParameter("@strWho", mcUserInfo.LoginName.ToUpper()));
                lcmd.Parameters.Add(new SqlParameter("@intAN8", intCustID));
                SqlDataAdapter ldsa = new SqlDataAdapter(lcmd);
                DataTable ldt = new DataTable();
                try
                {
                    lconn.Open();
                    ldsa.Fill(ldt);
                    nestedgrid.DataSource = ldt;
                }
                catch (SqlException exSQL)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(exSQL, lsRoutineName, lcmd, Session["UserName"].ToString());
                }
                catch (Exception ex)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(ex, lsRoutineName, Session["UserName"].ToString());
                }
                finally
                {
                    lconn.Close();
                }
      
            }
      
            protected void rgrdInstEquipment_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
            {
                MethodBase lmth = MethodBase.GetCurrentMethod();
                string lsRoutineName = lmth.DeclaringType + "." + lmth.Name;
                SqlConnection lconn = new SqlConnection(ConfigurationManager.ConnectionStrings["JDECommon"].ConnectionString);
      
                RadGrid nestedgrid = (RadGrid)source;
                GridNestedViewItem dataItem = (GridNestedViewItem)nestedgrid.NamingContainer;
                GridDataItem parentItem = dataItem.ParentItem;
                string strCustInfo = parentItem.GetDataKeyValue("CustomerNumber").ToString();
                int intCustID = Convert.ToInt32(strCustInfo);
      
                SqlCommand lcmd = new SqlCommand();
                lcmd.CommandTimeout = 600;
                lcmd.CommandText = "dbo.uspGetEquipmentInformationByCEI";
                lcmd.CommandType = CommandType.StoredProcedure;
                lcmd.Connection = lconn;
                lcmd.Parameters.Add(new SqlParameter("@Sys", "JDERT"));
                lcmd.Parameters.Add(new SqlParameter("@strWho", mcUserInfo.LoginName.ToUpper()));
                lcmd.Parameters.Add(new SqlParameter("@intAN8", intCustID));
                SqlDataAdapter ldsa = new SqlDataAdapter(lcmd);
                DataTable ldt = new DataTable();
                try
                {
                    lconn.Open();
                    ldsa.Fill(ldt);
                    nestedgrid.DataSource = ldt;
                }
                catch (SqlException exSQL)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(exSQL, lsRoutineName, lcmd, Session["UserName"].ToString());
                }
                catch (Exception ex)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(ex, lsRoutineName, Session["UserName"].ToString());
                }
                finally
                {
                    lconn.Close();
                }
      
            }
      
            protected void rgrdContacts_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
            {
                MethodBase lmth = MethodBase.GetCurrentMethod();
                string lsRoutineName = lmth.DeclaringType + "." + lmth.Name;
                SqlConnection lconn = new SqlConnection(ConfigurationManager.ConnectionStrings["JDECommon"].ConnectionString);
      
                RadGrid nestedgrid = (RadGrid)source;
                GridNestedViewItem dataItem = (GridNestedViewItem)nestedgrid.NamingContainer;
                GridDataItem parentItem = dataItem.ParentItem;
                string strCustInfo = parentItem.GetDataKeyValue("CustomerNumber").ToString();
                int intCustID = Convert.ToInt32(strCustInfo);
      
                SqlCommand lcmd = new SqlCommand();
                lcmd.CommandTimeout = 600;
                lcmd.CommandText = "dbo.uspGetContactInfoForECSMTByAN8";
                lcmd.CommandType = CommandType.StoredProcedure;
                lcmd.Connection = lconn;
                lcmd.Parameters.Add(new SqlParameter("@Sys", "JDERT"));
                lcmd.Parameters.Add(new SqlParameter("@strWho", mcUserInfo.LoginName.ToUpper()));
                lcmd.Parameters.Add(new SqlParameter("@intAN8", intCustID));
                SqlDataAdapter ldsa = new SqlDataAdapter(lcmd);
                DataTable ldt = new DataTable();
                try
                {
                    lconn.Open();
                    ldsa.Fill(ldt);
                    nestedgrid.DataSource = ldt;
                }
                catch (SqlException exSQL)
                {
                    Marlin.ErrorHandlers.ErrorAtServer lobjError = new Marlin.ErrorHandlers.ErrorAtServer();
                    lobjError.ProcessError(exSQL, lsRoutineName, lcmd, Session["UserName"].ToString());
                }
                catch (Exception ex)
                {
        &