Tooltip on radgrid row

3 posts, 0 answers
  1. Luca
    Luca avatar
    13 posts
    Member since:
    Dec 2008

    Posted 16 Apr 2010 Link to this post

    I try to load a tooltip after click on a radgrid row, and the first time I click all works fine, but if I close the tooltip and click another row, I'm getting a javascript error

    .cs code
            protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)  
            {  
                this.UpdateToolTip(args.Value, args.UpdatePanel);  
            }  
     
            private void UpdateToolTip(string elementID, UpdatePanel panel)  
            {  
                Control ctrl = Page.LoadControl("CustomerInfo.ascx");  
     
                panel.ContentTemplateContainer.Controls.Add(ctrl);  
                CustomerInfo details = (CustomerInfo)ctrl;  
                details.ProductID = "test";   
            } 

    .aspx markup
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> 
        <telerik:RadToolTipManager runat="server" AnimationDuration="300" ShowDelay="200" 
                HideDelay="1" ID="RadToolTipManager1" Width="480px" Height="210px" RelativeTo="Element" 
                Animation="Slide" Position="BottomCenter" OnAjaxUpdate="OnAjaxUpdate" Skin="Forest" HideEvent="ManualClose" ManualClose="True" ShowEvent="OnClick"></telerik:RadToolTipManager> 
        <asp:UpdatePanel ID="upUSers" runat="server">  
            <ContentTemplate> 
                  
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Hay" MultiPageID="rmpCustomers">  
            <Tabs> 
                <telerik:RadTab runat="server" Selected="true" Text="Lista">  
                </telerik:RadTab> 
                <telerik:RadTab runat="server" Text="Distribuzione">  
                </telerik:RadTab> 
            </Tabs> 
        </telerik:RadTabStrip> 
        <telerik:RadMultiPage ID="rmpCustomers" runat="server" SelectedIndex="0">  
                    <telerik:RadPageView ID="RadPageView1" runat="server">  
                        <div class="back_tab">  
                            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
                            <AjaxSettings> 
                            <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                            <UpdatedControls> 
                                <telerik:AjaxUpdatedControl ControlID="rgrCustomers" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                            </UpdatedControls> 
                        </telerik:AjaxSetting> 
     
                            </AjaxSettings> 
                            </telerik:RadAjaxManager> 
                            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">  
                            </telerik:RadAjaxLoadingPanel> 
                            <br /> 
                            <telerik:RadGrid ID="rgrCustomers" runat="server" AllowFilteringByColumn="True"   
                AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"   
                GridLines="None" Skin="Hay"    
                           PageSize="15" AllowCustomPaging="True"   
                           onpageindexchanged="rgrCustomers_PageIndexChanged" > 
                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">  
                    <Selecting AllowRowSelect="True" /> 
                </ClientSettings> 
                <MasterTableView> 
                <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
     
                <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn HeaderText="ID" UniqueName="column" DataField="abecod">  
                            <HeaderStyle Width="40px" /> 
                            <ItemStyle Width="40px" /> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Descrizione" UniqueName="column1" DataField="abers1">  
                            <HeaderStyle Width="200px" /> 
                            <ItemStyle Width="200px" /> 
                            </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Località" UniqueName="column2" DataField="abeloc">  
                            <HeaderStyle Width="150px" /> 
                            <ItemStyle Width="150px" /> 
                            </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Indirizzo" UniqueName="column3" DataField="abeind">  
                            <HeaderStyle Width="150px" /> 
                            <ItemStyle Width="2150px" /> 
                            </telerik:GridBoundColumn> 
                    </Columns> 
                      
                </MasterTableView> 
                           <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
                    </telerik:RadGrid> 

    .ascx markup
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CustomerInfo.ascx.cs" Inherits="GestioneOrdini.CustomerInfo" %> 
    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
    <p> 
        Scheda cliente</p> 
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="1"   
        Skin="Hay" MultiPageID="RadMultiPage1">  
        <Tabs> 
            <telerik:RadTab runat="server" Text="Dati anagrafici" Selected="True">  
            </telerik:RadTab> 
            <telerik:RadTab runat="server" Text="Elenco contatti">  
            </telerik:RadTab> 
        </Tabs> 
    </telerik:RadTabStrip> 
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">  
        <telerik:RadPageView ID="RadPageView1" runat="server">  
        <div> 
            <asp:Label ID="Label1" runat="server" CssClass="etichette" Text="Codice"></asp:Label> 
        </div> 
        <div> 
            <asp:Label ID="Label2" runat="server" CssClass="etichette" Text="Ragione sociale"></asp:Label> 
        </div> 
        <div> 
            <asp:Label ID="Label3" runat="server" CssClass="etichette" Text="Indirizzo"></asp:Label> 
        </div> 
        <div> 
            <asp:Label ID="Label4" runat="server" CssClass="etichette" Text="Località"></asp:Label> 
        </div> 
              
        </telerik:RadPageView> 
        <telerik:RadPageView ID="RadPageView2" runat="server">  
        <div>yyy</div> 
        </telerik:RadPageView> 
    </telerik:RadMultiPage> 
     

    attached the error

    thanks
  2. Luca
    Luca avatar
    13 posts
    Member since:
    Dec 2008

    Posted 19 Apr 2010 Link to this post

    no idea ?!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Luca
    Luca avatar
    13 posts
    Member since:
    Dec 2008

    Posted 19 Apr 2010 Link to this post

    found the problem myself...

    if the radgrid is within an <asp:UpdatePanel> instead a <telerik:RadAjaxPanel> the javascript raise the error posted.

    regards
Back to Top