This is a migrated thread and some comments may be shown as answers.

Tooltip on radgrid row

2 Answers 91 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Luca
Top achievements
Rank 1
Luca asked on 16 Apr 2010, 04:52 PM
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 Answers, 1 is accepted

Sort by
0
Luca
Top achievements
Rank 1
answered on 19 Apr 2010, 09:22 AM
no idea ?!
0
Luca
Top achievements
Rank 1
answered on 19 Apr 2010, 10:08 AM
found the problem myself...

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

regards
Tags
ToolTip
Asked by
Luca
Top achievements
Rank 1
Answers by
Luca
Top achievements
Rank 1
Share this question
or