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

Tooltip manager not updating value

2 Answers 24 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ian Welsh
Top achievements
Rank 1
Ian Welsh asked on 08 Jun 2010, 09:31 PM
I am using the following code from this example to dynamically pull products based on quote number.
 
protected void Review_RadToolTipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) 
    { 
        Control ctrl = Page.LoadControl("Quote_Detail.ascx"); 
        e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl); 
        ((Label)ctrl.FindControl("lblQuoteID")).Text = e.Value; 
    } 
    protected void Review_RadGrid_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            Review_RadToolTipManager.TargetControls.Add(e.Item.ClientID, ((DataRowView)e.Item.DataItem)["QuoteID"].ToString(), true); 
        } 
    } 

However, when I filter the grid or group it the values won't update on the rows. Do I need to rebind the grid on any function that would change row order of quote ids?

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 11 Jun 2010, 03:41 PM
Hi Ian,

Try handling the grid ItemCommand event, and there on Filter, Sort and Page commands clear the RadToolTipManager target controls.

Try it out and let me know if it works.

All the best,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ian Welsh
Top achievements
Rank 1
answered on 11 Jun 2010, 04:09 PM
Actually I found this following code to fix the problem...

 protected void Review_RadGrid_ItemCommand(object source, GridCommandEventArgs e)  
    {  
        if (e.CommandName == "Sort" || e.CommandName == "Page" || e.CommandName == "Filter")  
        {  
            Review_RadToolTipManager.TargetControls.Clear();  
        }  
    }  
    protected void Review_RadGrid_GroupsChanging(object source, GridGroupsChangingEventArgs e)  
    {  
        Review_RadToolTipManager.TargetControls.Clear();  
    } 
Tags
Grid
Asked by
Ian Welsh
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Ian Welsh
Top achievements
Rank 1
Share this question
or