hi,
I'm using the radorgchart control to display the an organization hierarchy which displays fine. I'm not using the drill down functionality here but I'm following this example
https://demos.telerik.com/aspnet-ajax/orgchart/examples/applicationscenarios/integrationwithradtooltip/defaultcs.aspx
I want to display tooltips with further details for each node in the RadOrgChart, the tooltips won't appear and the OnAjaxUpdate event doesn't fire. Please help.
(I have removed all functionality related to drilling down nodes.)
here is my code in the .aspx,
my code in aspx.cs
my code in .ascx
my code in ascx.cs
I'm using the radorgchart control to display the an organization hierarchy which displays fine. I'm not using the drill down functionality here but I'm following this example
https://demos.telerik.com/aspnet-ajax/orgchart/examples/applicationscenarios/integrationwithradtooltip/defaultcs.aspx
I want to display tooltips with further details for each node in the RadOrgChart, the tooltips won't appear and the OnAjaxUpdate event doesn't fire. Please help.
(I have removed all functionality related to drilling down nodes.)
here is my code in the .aspx,
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BrandixReportingStructure.aspx.cs" Inherits="UserInterfaces_BrandixReportingStructure" %><%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %><%@ Register Src="~/UserInterfaces/OrgChartEmployeeDetails.ascx" TagPrefix="uc" TagName="employeedetails" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <telerik:RadOrgChart ID="RadOrgChart1" runat="server" Skin="Default" DataFieldID="AssociateId" DataFieldParentID="ReportsTo" DataTextField="AssociateName" DataSourceID="SqlDataSource1"> <ItemTemplate> <asp:Panel ID="Panel1" runat="server"> <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("AssociateImage") %>' AutoAdjustImageControlSize="false" Height="50px" Width="50px" ToolTip='<%#Eval("AssociateName", "Photo of {0}") %>' AlternateText='<%#Eval("AssociateName", "Photo of {0}") %>'> </telerik:RadBinaryImage> <%#Eval("AssociateName") %> </asp:Panel> </ItemTemplate> </telerik:RadOrgChart> <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Skin="Default" OnAjaxUpdate="OnAjaxUpdate" Position="BottomRight" OffsetX="16" OffsetY="16" EnableShadow="false" Width="400" Height="135" AutoCloseDelay="10000" EnableAJAX="true"/> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT AssociateId, AssociateName,AssociateImage, ReportsTo, ManagerName FROM OrgStructure"></asp:SqlDataSource> </form> </body></html>my code in aspx.cs
using System;using System.Linq;using System.Web.UI;using Telerik.Web.UI;public partial class UserInterfaces_BrandixReportingStructure : System.Web.UI.Page{ public void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs e) { Control ctrl = this.Page.LoadControl("OrgChartEmployeeDetails.ascx"); ctrl.ID = "UcEmployeeDetails1"; e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl); UserInterfaces_OrgChartEmployeeDetails details = (UserInterfaces_OrgChartEmployeeDetails)ctrl; details.UserName = e.Value; e.UpdatePanel.ContentTemplateContainer.Controls.Add(new LiteralControl("My dynamic tooltip")); } protected void Page_Load(object sender, EventArgs e) { } }my code in .ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="OrgChartEmployeeDetails.ascx.cs" Inherits="UserInterfaces_OrgChartEmployeeDetails" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource_BrandContactDetails"> <ItemTemplate> <div style="width:400px; float:left; font-size:12px; font-family:'Segoe UI'"> <div style="width:50px;"> <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("BuyerImage") %>' AutoAdjustImageControlSize="false" Height="50px" Width="50px" ToolTip='<%#Eval("ContactPerson", "Photo of {0}") %>' AlternateText='<%#Eval("ContactPerson", "Photo of {0}") %>'></telerik:RadBinaryImage> </div> <div style="width:50px;"> Brand Contact </div> <div style="width:50px;"> <%# Eval("Brand")%> <%# Eval("ContactPerson")%> <br/> <%# Eval("Designation")%> </div> <div style="width:50px;"> Relationship Level </div> <div style="width:50px;"> <asp:Image ID="Image1" runat="server" /> </div> <div style="width:50px;"> Frequency </div> <div style="width:50px;"> <%# Eval("FrequencyString")%> </div> <div style="width:50px;"> <%# Eval("RelationType")%> </div> </div> </ItemTemplate></asp:Repeater><asp:SqlDataSource ID="SqlDataSource_BrandContactDetails" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT TOP (100) PERCENT V_UpcomingRelationDetails.RelationType, V_UpcomingRelationDetails.Brand, V_UpcomingRelationDetails.ContactPerson, V_UpcomingRelationDetails.Designation, V_UpcomingRelationDetails.FrequencyString, V_UpcomingRelationDetails.Level, BuyerDetail.BuyerImage FROM V_UpcomingRelationDetails INNER JOIN BuyerDetail ON V_UpcomingRelationDetails.Brand = BuyerDetail.Brand AND V_UpcomingRelationDetails.ContactPerson = BuyerDetail.[Contact Person] AND V_UpcomingRelationDetails.Designation = BuyerDetail.Designation WHERE (V_UpcomingRelationDetails.TeamMemeber LIKE '%' + @user + '%') ORDER BY V_UpcomingRelationDetails.Brand, V_UpcomingRelationDetails.ContactPerson"> <SelectParameters> <asp:Parameter Name="user" /> </SelectParameters></asp:SqlDataSource>my code in ascx.cs
using System;using System.Linq;public partial class UserInterfaces_OrgChartEmployeeDetails : System.Web.UI.UserControl{ public string UserName { get; set; } protected void Page_Load(object sender, EventArgs e) { this.SqlDataSource_BrandContactDetails.SelectParameters[0].DefaultValue = this.UserName; }}