Hi, I have a radgrid with one template column with a icon. I need to add a tooltips that will display a picture.
In the ItemDataBound of the grid I update the column icon and set a tooltip and add this tooltip in the page with a panel. This part work good, the tooltip popup with the text "TEST". Now I when to use the OnAjaxUpdate of the radToolTipsManager to display a picture insted of the text. I cant fire this function. I think the link are not made between the tooltip and the tooltipsmanager. For example I set the skin Web20Orange in the Tooltipsmanager but the tooltip fired in the ragrid are with the default skin. Any idea?
VB
ASPX
Another thing: When I add tha OnAjaxUpdate, the page crash when the mouse hover the + - icone of the grid group. If I remve this OnAjaxUpdate from the tooltipsmanager line, the toolip of the + radgrid appear correctly (displaying "Collapse group")
Thanks
Pierre
In the ItemDataBound of the grid I update the column icon and set a tooltip and add this tooltip in the page with a panel. This part work good, the tooltip popup with the text "TEST". Now I when to use the OnAjaxUpdate of the radToolTipsManager to display a picture insted of the text. I cant fire this function. I think the link are not made between the tooltip and the tooltipsmanager. For example I set the skin Web20Orange in the Tooltipsmanager but the tooltip fired in the ragrid are with the default skin. Any idea?
VB
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) |
If TypeOf e.Item Is GridDataItem Then |
Dim Photo As System.Web.UI.WebControls.Image = CType(e.Item.FindControl("Photo"), System.Web.UI.WebControls.Image) |
If DataBinder.Eval(e.Item.DataItem, "Photo") = True Then |
Photo.ID = DataBinder.Eval(e.Item.DataItem, "ID") |
Photo.ImageUrl = "/Images/Photo.gif" |
Photo.ImageAlign = System.Web.UI.WebControls.ImageAlign.AbsMiddle |
Photo.Style.Add("vertical-align", "middle") |
Photo.BorderWidth = Unit.Pixel(0) |
Dim monTooltips As New RadToolTip |
monTooltips.ID = Guid.NewGuid.ToString |
monTooltips.TargetControlID = DataBinder.Eval(e.Item.DataItem, "ID") |
monTooltips.RelativeTo = ToolTipRelativeDisplay.Element |
monTooltips.Position = ToolTipPosition.MiddleRight |
monTooltips.Text = "Test" |
Panel1.Controls.Add(monTooltips) |
Else |
Photo.ImageUrl = "/Gestion/Images/16X16/Blank.gif" |
Photo.AlternateText = "" |
Photo.ImageAlign = System.Web.UI.WebControls.ImageAlign.AbsMiddle |
Photo.Style.Add("vertical-align", "middle") |
Photo.BorderWidth = Unit.Pixel(0) |
End If |
End If |
End Sub |
ASPX
<div style="margin:10px 10px"> |
<asp:Panel ID="Panel1" runat="server"> |
</asp:Panel> |
<telerik:RadToolTipManager ID="RadToolTipManager1" OnAjaxUpdate="OnAjaxUpdate" runat="server" Skin="Web20Orange" animation="Fade"> |
</telerik:RadToolTipManager> |
<radG:RadGrid ID="RadGridMembre" runat="server" EnableAJAX="true" Width="400" ShowHeader="true" ShowFooter="false" AutoGenerateColumns="false" |
Skin="Orange" AllowSorting="false" AllowPaging="true" ShowGroupPanel="false" |
OnItemDataBound="RadGrid1_ItemDataBound" OnNeedDataSource="RadGrid1_NeedDataSource1"> |
<ClientSettings AllowColumnsReorder="false" EnablePostBackOnRowClick="false"> |
<Selecting AllowRowSelect="false"/> |
</ClientSettings> |
<PagerStyle CssClass="RadGridPager" Mode="NextPrevAndNumeric"></PagerStyle> |
<MasterTableView AutoGenerateColumns="False" PageSize="30"> |
<GroupByExpressions> |
<radG:GridGroupByExpression> |
<SelectFields> |
<radG:GridGroupByField FieldAlias="Pupitre" FieldName="Pupitre"></radG:GridGroupByField> |
</SelectFields> |
<GroupByFields> |
<radG:GridGroupByField FieldName="Pupitre" SortOrder="Ascending"></radG:GridGroupByField> |
</GroupByFields> |
</radG:GridGroupByExpression> |
</GroupByExpressions> |
<Columns> |
<radG:GridBoundColumn DataField="ID" Display="false" ReadOnly="True" DataType="System.String" HeaderText="Nom d'usager" |
SortExpression="ID" UniqueName="ID"> |
<HeaderStyle /> |
</radG:GridBoundColumn> |
<radG:GridTemplateColumn HeaderText="" uniquename="Photo" Groupable="False"> |
<ItemTemplate> |
<asp:Image ID="Photo" BorderWidth="0px" |
ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ID") %>' runat="server"> |
</asp:Image> |
</ItemTemplate> |
</radG:GridTemplateColumn> |
<radG:GridBoundColumn DataField="NomComplet" DataType="System.string" HeaderText="Nom" UniqueName="NomComplet"> |
</radG:GridBoundColumn> |
<radG:GridBoundColumn DataField="Depuis" DataType="System.string" HeaderText="Membre depuis" DataFormatString="{0:d}" UniqueName="Depuis"> |
</radG:GridBoundColumn> |
</Columns> |
</MasterTableView> |
</radG:RadGrid> |
Another thing: When I add tha OnAjaxUpdate, the page crash when the mouse hover the + - icone of the grid group. If I remve this OnAjaxUpdate from the tooltipsmanager line, the toolip of the + radgrid appear correctly (displaying "Collapse group")
Thanks
Pierre