I have a ToolTipManager on a page when a button is clicked loads a UserControl based off of which item is clicked. In this particular instance it has two dropdowns and a textbox. It also has a save button. The problem I am having is that I cannot get any event to trigger inside the tooltip. When I click my save button the OnAjaxUpdate event fires but the button click event does not. Here is what I have codewise:
In my page:
The user control:
Here's the code AjaxCode:
The code in SaveInfo is irrelevant because SaveClicked is not even firing! A huge thank you in advance for any help I can get as I'm pushing deadline.
In my page:
| <telerik:RadToolTipManager ID="tltAvailability" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element" |
| ShowEvent="OnClick" HideEvent="ManualClose" |
| Position="MiddleLeft" Animation=FlyIn RenderInPageRoot="true" Width="250" Height="200" |
| ></telerik:RadToolTipManager> |
The user control:
| <%@ Control Language="C#" AutoEventWireup="true" CodeFile="repAvailability.ascx.cs" Inherits="cox.applications.web.ehealth.physicianreferral.AvailabilityToolTip" %> |
| <%@ Reference Control="~/tooltipcontent/ToolTipContent.ascx" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <script type="text/javascript"> |
| </script> |
| <asp:FormView ID="fvwAvailability" runat="server" OnItemCreated="CreatedFormItem" OnItemCommand="fvwAvailability_ItemCommand" > |
| <ItemTemplate> |
| Type of Availability:<br /> |
| <telerik:RadComboBox ID="ddlTypes" runat="server" DataValueField="ID" DataTextField="Description" ZIndex="10000" |
| AutoPostBack="true" OnSelectedIndexChanged="SelectedType"> |
| </telerik:RadComboBox><br /> |
| Age Available:<br /> |
| <asp:TextBox ID="txtAge" runat="server" Width="75px" ></asp:TextBox><br /> |
| Range of Availbility:<br /> |
| <telerik:RadComboBox ID="ddlRange" runat="server" DataTextField="Description" DataValueField="ID" ZIndex="10000" > |
| </telerik:RadComboBox><br /> |
| </ItemTemplate> |
| </asp:FormView> |
| <asp:Button ID="btnSave" runat="server" OnClick="SaveClicked" Text="Save" UseSubmitBehavior="false" /> |
| protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) |
| { |
| _currentPhysician = Shared.CurrentPhysician; |
| string[] values = args.Value.Split('|'); |
| if (values.Length > 0) |
| { |
| Control saveButton = this.UpdateToolTip(values[0], args.UpdatePanel, int.Parse(values[1])); |
| } |
| } |
| private Control UpdateToolTip(string section, UpdatePanel update, int index) |
| { |
| ToolTipContent ctl = (ToolTipContent)Page.LoadControl("tooltipcontent/" + section + ".ascx"); |
| ctl.SetIndex(index); |
| update.ContentTemplateContainer.Controls.Add(ctl); |
| return ctl.SaveButton; |
| } |
| /* THIS CODE IS FROM THE USER CONTROL */ |
| public void SetIndex(int index) |
| { |
| _index = index; |
| SetDataSource(); |
| } |
| protected override void SetDataSource() |
| { |
| if (this._index >= 0) |
| { |
| List<AvailabilityInfo> inf = Shared.CurrentPhysician.AvailabilityInfo; |
| fvwAvailability.DataSource = (from i in inf |
| where inf.IndexOf(i) == this._index |
| select i); |
| _baseInfo = (ApprovableItem)fvwAvailability.DataItem; |
| } |
| else |
| { |
| fvwAvailability.DataSource = null; |
| _baseInfo = new ApprovableItem(Null.NullInteger, StatusType.Pending, Null.NullInteger, Null.NullDate, Shared.User, Null.NullString); |
| } |
| fvwAvailability.DataBind(); |
| } |
| protected void SaveClicked(object sender, EventArgs e) |
| { |
| SaveInfo(); |
| } |
The code in SaveInfo is irrelevant because SaveClicked is not even firing! A huge thank you in advance for any help I can get as I'm pushing deadline.