I am using RadTooltipmanager for a control in detailview section of a radgrid. Tooltipmanager is bound in item_databound event and associated with user control in Ajax update event. Tooltipmanager is properly invoked and page_load event of the user control is also fired but still user control is loaded in the tooltipmanager.
Code in item_databound event ->
if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
{
Control target = e.Item.FindControl("imgFinal");
if (!Object.Equals(target, null))
{
if (!Object.Equals(this.RadToolTipManager1, null))
{
DataRowView currentRow = (DataRowView)e.Item.DataItem;
//Add the button (target) id to the tooltip manager
ToolTipTargetControl tltpCntrl = new ToolTipTargetControl(target.ClientID, ((Image)target).ImageUrl, true);
try
{
this.RadToolTipManager1.TargetControls.Remove(tltpCntrl);
}
catch (Exception ex)
{
}
this.RadToolTipManager1.TargetControls.Add(tltpCntrl);
}
}
}
Ajax Update event
Control usrControl = Page.LoadControl("~/Common/Controls/EPScoring.ascx");
e.UpdatePanel.ContentTemplateContainer.Controls.Add(usrControl);
Code in item_databound event ->
if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
{
Control target = e.Item.FindControl("imgFinal");
if (!Object.Equals(target, null))
{
if (!Object.Equals(this.RadToolTipManager1, null))
{
DataRowView currentRow = (DataRowView)e.Item.DataItem;
//Add the button (target) id to the tooltip manager
ToolTipTargetControl tltpCntrl = new ToolTipTargetControl(target.ClientID, ((Image)target).ImageUrl, true);
try
{
this.RadToolTipManager1.TargetControls.Remove(tltpCntrl);
}
catch (Exception ex)
{
}
this.RadToolTipManager1.TargetControls.Add(tltpCntrl);
}
}
}
Ajax Update event
Control usrControl = Page.LoadControl("~/Common/Controls/EPScoring.ascx");
e.UpdatePanel.ContentTemplateContainer.Controls.Add(usrControl);