PLEASE IGNORE THIS. IT WAS A SIMPLE HTML ISSUE. I COULD NOT FIGURE OUT HOW TO DELETE A THREAD!
I am implementing a radGrid with a custom ItemTemplate. I am adding a tooltip declaratively in the ItemTemplate, and binding the tooltip to a targetcontrol in the grid's ItemDataBound event. The result is that only the FIRST row will properly display the tooltip.
(simplified version of the code):
On the ItemDataBound event, I populate the ToolTip with the contents of a UserControl
The result is that only the FIRST item in the grid will properly display the tooltip. It is important to note that the end result of the grid is NOT the typical row grid, but rather three columns of "rows" next to eachother, similar to this example:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx
Thank you.
I am implementing a radGrid with a custom ItemTemplate. I am adding a tooltip declaratively in the ItemTemplate, and binding the tooltip to a targetcontrol in the grid's ItemDataBound event. The result is that only the FIRST row will properly display the tooltip.
(simplified version of the code):
<telerik:RadGrid ID="grdFilter" runat="server" GridLines="None" AllowPaging="true" AllowSorting="true" ShowHeader="false" |
PageSize="18" OnPreRender="grdFilter_PreRender" OnNeedDataSource="grdFilter_NeedDataSource" OnItemDataBound="grdFilter_ItemDataBound" |
OnItemCreated="grdFilter_ItemCreated" OnItemCommand="grdFilter_ItemCommand"> |
<MasterTableView ItemStyle-CssClass="grdAAP" AlternatingItemStyle-CssClass="grdAAP" PagerStyle-Mode="Slider"> |
<ItemTemplate> |
<telerik:RadToolTip ID="RadToolTip1" runat="server" IsClientID="true" RelativeTo="Element" Position="Center"> |
<asp:PlaceHolder ID="phToolTip" runat="server"></asp:PlaceHolder> |
</telerik:RadToolTip> |
<asp:panel ID="itemcontainer" CssClass="item" runat="server"> |
<asp:Label ID="lblDetails" runat="server" Text="Details..."></asp:Label> |
</asp:panel> |
</ItemTemplate> |
<PagerStyle Position="Top" AlwaysVisible="true" /> |
</MasterTableView> |
</telerik:RadGrid> |
On the ItemDataBound event, I populate the ToolTip with the contents of a UserControl
protected void grdFilter_ItemDataBound(object source, Telerik.Web.UI.GridItemEventArgs e) |
{ |
if (e.Item is GridDataItem) |
{ |
DataRowView dvthis = (DataRowView)e.Item.DataItem; |
PlaceHolder phTooltip = (PlaceHolder) e.Item.FindControl("phToolTip"); |
RadToolTip rTooltip = (RadToolTip)e.Item.FindControl("RadToolTip1"); |
Label lblTT = (Label) e.Item.FindControl("lblDetails"); |
rTooltip.TargetControlID = lblTT.ClientID; |
rTooltip.IsClientID = true; |
String sku = dvthis["SKU"].ToString(); |
Control ctrl = LoadControl("AAPTooltip.ascx"); |
AAPTooltip details = (AAPTooltip)ctrl; |
details.productID = sku; |
phTooltip.Controls.Add(details); |
} |
} |
The result is that only the FIRST item in the grid will properly display the tooltip. It is important to note that the end result of the grid is NOT the typical row grid, but rather three columns of "rows" next to eachother, similar to this example:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx
Thank you.