Hi,
I am (obviously) new to Prometheous and was wondering if you could tell me where I am going wrong with my problem.
I have a radAjaxPanel that contains timing data. This timing data is refreshed over AJAX every 10 seconds. Each individual being timed has a number of properties (such as best times, entrant, etc.), which should dispplay on clicking on the name of the rider. This should appear in a ToolTip.
I'll walk you quickly through my code:
I have the following ToolTipManager:
I have an Ajax Panel (standard radControls):
Inside which I am rendering a table of results. For a row:
All very simple.
Not if we take the tdRiderName cell (I've highlighted this in bold). I hook into the binding on the OnItemDataBound event of the Repeater, thus:
This displays an empty bubble. More or less okay. Problem is, it does not call my AjaxUpdate event, even though it is defined in Page_Load:
Also, when the page is refreshed via the Ajax Panel On Ajax Request event, I get a JS error, saying "Object doesn't support this property or method".
I must be missing something here, can someone please help?
Many thanks
Nathan
I am (obviously) new to Prometheous and was wondering if you could tell me where I am going wrong with my problem.
I have a radAjaxPanel that contains timing data. This timing data is refreshed over AJAX every 10 seconds. Each individual being timed has a number of properties (such as best times, entrant, etc.), which should dispplay on clicking on the name of the rider. This should appear in a ToolTip.
I'll walk you quickly through my code:
I have the following ToolTipManager:
<telerik:RadToolTipManager ID="radTooltipManager" runat="server" |
Width="430px" |
Height="40px" |
OffsetX="100" |
Animation="None" |
Sticky="true" |
Title="Hello" |
Position="BottomRight" |
ManualClose="true" |
Skin="Default"> |
</telerik:RadToolTipManager> |
I have an Ajax Panel (standard radControls):
<radA:RadAjaxPanel ID="radAjaxPanelSector" runat="server" LoadingPanelID="ajaxLoadingPanel"> |
Inside which I am rendering a table of results. For a row:
<asp:Repeater ID="rptTop10Riders" runat="server"> |
<ItemTemplate> |
<tr> |
<td headers="thIcon" id="tdIcon" runat="server"></td> |
<td headers="thPosition"><%# DataBinder.Eval(Container.DataItem,"SectorLeaderboardPosition") %></td> |
<td headers="thRaceNo" id="tdRaceNo" runat="server" class="raceNo"></td> |
<td headers="thRiderName" id="tdRiderName" runat="server" class="riderName"></td> |
<td headers="thMachine"><%# DataBinder.Eval(Container.DataItem,"Machine") %></td> |
<td headers="thLap"><%# DataBinder.Eval(Container.DataItem,"LapNumber") %></td> |
<td headers="thSectorTime"><%# DataBinder.Eval(Container.DataItem,"SectorTimeAsString") %></td> |
<td headers="thLapTime"><%# DataBinder.Eval(Container.DataItem,"LapTimeAsString") %></td> |
<td headers="thLapSpeed"><%# DataBinder.Eval(Container.DataItem,"LapSpeed") %></td> |
</tr> |
</ItemTemplate> |
</asp:Repeater> |
All very simple.
Not if we take the tdRiderName cell (I've highlighted this in bold). I hook into the binding on the OnItemDataBound event of the Repeater, thus:
void rptTop10Riders_ItemDataBound(object sender, RepeaterItemEventArgs e) |
{ |
switch (e.Item.ItemType) |
{ |
case ListItemType.Item: |
case ListItemType.AlternatingItem: |
SectorResults sectorResults=(SectorResults)e.Item.DataItem; |
HtmlTableCell tdRiderName=(HtmlTableCell)e.Item.FindControl("tdRiderName"); |
HtmlAnchor riderNameAnchor=new HtmlAnchor(); |
riderNameAnchor.Controls.Add(new LiteralControl(sectorResults.CompetitorName)); |
//riderNameAnchor.HRef="#"; |
riderNameAnchor.ID="riderNameAnchor"+sectorResults.RaceNumber.ToString(); |
riderNameAnchor.Title="Click to expand this riders details"; |
tdRiderName.Controls.Add(riderNameAnchor ); |
this.radTooltipManager.TargetControls.Add(riderNameAnchor.ID); |
} |
break; |
} |
} |
This displays an empty bubble. More or less okay. Problem is, it does not call my AjaxUpdate event, even though it is defined in Page_Load:
radTooltipManager.AjaxUpdate+=new Telerik.Web.UI.ToolTipUpdateEventHandler(radTooltipManager_AjaxUpdate); |
void radTooltipManager_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs e) |
{ |
int index = e.TargetControlID.LastIndexOf("_"); |
string elementID = e.TargetControlID.Substring(index + 1); |
this.UpdateToolTip(elementID, e.UpdatePanel); |
} |
Also, when the page is refreshed via the Ajax Panel On Ajax Request event, I get a JS error, saying "Object doesn't support this property or method".
I must be missing something here, can someone please help?
Many thanks
Nathan