Hi Everyone
I'm new to this site and this is my first post. So please forgive me if this issue had alrady been posted.
I have a radtooltip inside a simple webpart (not a visual webpart) in a Sharepoint project. Because the webpart is not a visual one, I create a tooltip together with all the other components on the server side in the OnPreRender event.
There is a radajaxpanel surounding the webpart which in turn contains a div which in turn contains a table for every record I want to display in the webpart. Each table contains a radtooltip. There is also a radajaxloadingpanel that points to my webpart.
My webpart is connected to a calendar webpart on the page. When the user interacts with the calendar webpart and selectes a different date, I refresh my webpart to display the data for that day. The problem is the radtooltip in my webpart stops working after the webpart is refreshed via ajax.
Also, when the page first loads or does a full refresh, sometimes the radtooltip works and sometimes it does not.
The bit of the code that creates the tooltip in the webpart is as follows:
I'm new to this site and this is my first post. So please forgive me if this issue had alrady been posted.
I have a radtooltip inside a simple webpart (not a visual webpart) in a Sharepoint project. Because the webpart is not a visual one, I create a tooltip together with all the other components on the server side in the OnPreRender event.
There is a radajaxpanel surounding the webpart which in turn contains a div which in turn contains a table for every record I want to display in the webpart. Each table contains a radtooltip. There is also a radajaxloadingpanel that points to my webpart.
My webpart is connected to a calendar webpart on the page. When the user interacts with the calendar webpart and selectes a different date, I refresh my webpart to display the data for that day. The problem is the radtooltip in my webpart stops working after the webpart is refreshed via ajax.
Also, when the page first loads or does a full refresh, sometimes the radtooltip works and sometimes it does not.
The bit of the code that creates the tooltip in the webpart is as follows:
RadToolTip tooltip = new RadToolTip();
tooltip.ID = "RadToolTip" + note.ID;
tooltip.TargetControlID = "divSubject" + note.ID;
tooltip.IsClientID = true;
tooltip.ShowEvent = ToolTipShowEvent.OnMouseOver;
tooltip.HideEvent = ToolTipHideEvent.LeaveToolTip;
tooltip.RelativeTo = ToolTipRelativeDisplay.Element;
tooltip.Skin = "Hay";
tooltip.Animation = ToolTipAnimation.None;
tooltip.ShowCallout = true;
tooltip.Title = note.Subject;
tooltip.CssClass = "diaryToolTip";
tooltip.EnableAjaxSkinRendering = true;
tooltip.RegisterWithScriptManager = true;
string line = @"<
table
border
=
'0'
>
<
tr
>
<
td
valign
=
'top'
align
=
'left'
width
=
'60'
>
<
strong
>Type: </
strong
>
</
td
>
<
td
align
=
'left'
>" + note.TypeName +
@"</
td
>
</
tr
>
</
table
>";
tooltip.Controls.Add(new LiteralControl(line));
phDiary.Controls.Add(tooltip);
("note" is a custom class and "phDiary" is the placeholder object that holds all components)
Any help is greatly appreciated.
Regards
Mohammad