RadScheduler and ToolTipManager (Resource Headers)

7 posts, 0 answers
  1. Brian Taylor
    Brian Taylor avatar
    13 posts
    Member since:
    May 2010

    Posted 16 Jun 2011 Link to this post

    Hi,
    I want to add a tooltip to the resource header (not the appointment) in the scheduler.
    Ive tried to modify the following example, but iam unsure how to proceed.

    http://demos.telerik.com/aspnet-ajax/scheduler/examples/radtooltip/defaultvb.aspx
  2. Plamen
    Admin
    Plamen avatar
    2954 posts

    Posted 21 Jun 2011 Link to this post

    Hi Brian Taylor,

    You can add the tooltip to the resource header by the ID of the resource header. I've added this text to our ResourceHeaderTemplate demo to represent how you can do this:
    <ResourceHeaderTemplate>
                <telerik:RadToolTip runat="server" TargetControlID="ResourceImageWrapper" Text="This is your tooltip on the ResourceHeader template">
                </telerik:RadToolTip>
                <asp:Panel ID="ResourceImageWrapper" runat="server" CssClass="ResCustomClass">
                    <asp:Image ID="SpeakerImage" runat="server" ImageUrl='<%# "~/Scheduler/Examples/ResourceHeaderTemplates/Img/" + Eval("Text") %>'
                        AlternateText='<%# Eval("Text") %>' />
                </asp:Panel>
            </ResourceHeaderTemplate>

    Hope this helps.

    Regards,
    Plamen Zdravkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Brian Taylor
    Brian Taylor avatar
    13 posts
    Member since:
    May 2010

    Posted 28 Jul 2011 Link to this post

    Hi,
    This works fine initially, but if I change the value in a dropdown list outside the grid, a  RadScheduler1.Rebind() is issued which shows a different set of resources. The problem is when if hover over the 1st resource header e.value in RadToolTipManagerResource_AjaxUpdate returns the ID of the the resource that was originally listed on the 1st row etc.

     

    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ddlSite">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    <telerik:AjaxUpdatedControl ControlID="RadToolTipManager2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

        Protected Sub RoomsDataSource_Selecting(sender As Object, e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles RoomsDataSource.Selecting
            mResourceSelected = True
            RadToolTipManager2.TargetControls.Clear()
            e.Command.Parameters("@ResourceGroup").Value = mUID
        End Sub

    Protected Sub RadScheduler1_ResourceHeaderCreated(sender As Object, e As Telerik.Web.UI.ResourceHeaderCreatedEventArgs) Handles RadScheduler1.ResourceHeaderCreated
         'RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(RadScheduler1, e.Container)
        If mResourceSelected Then ' Stops code excuting for previous listed resources
            Dim ResourceImageWrapper As Panel = TryCast(e.Container.FindControl("ResourceImageWrapper"), Panel)
            RadToolTipManager2.TargetControls.Add(ResourceImageWrapper.ClientID, e.Container.Resource.Key.ToString(), True)
        End If
    End Sub
  4. Plamen
    Admin
    Plamen avatar
    2954 posts

    Posted 02 Aug 2011 Link to this post

    Hello Brian,

    It is a little complicated for us to reproduce the issue with the given information.

    Would you please open a support ticket and try to isolate the problem in a sample project so we could have a better view over the problem and provide you with the most appropriate solution for it.

    Best wishes,
    Plamen Zdravkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  5. Brian Taylor
    Brian Taylor avatar
    13 posts
    Member since:
    May 2010

    Posted 09 Aug 2011 Link to this post

    About a week ago I had an idea to add the extra setting " <telerik:AjaxUpdatedControl ControlID="RadToolTipManager2" />"

            <telerik:AjaxSetting AjaxControlID="ddlSite">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="RadToolTipManager2" />
                </UpdatedControls>
            </telerik:AjaxSetting>

    This did not appear to work at the time, but I returned to the project inorder to try and put a full demo together which I could send you and to it appears to be working correctly now.

    As I can not recreate the issue at the moment this request can be closed.

    Thanks
      Brian
  6. Jose
    Jose avatar
    1 posts
    Member since:
    Nov 2012

    Posted 07 Dec 2012 Link to this post

    I've seen the demo, but, how can i have the resource headers with a simple label and the text loaded from codebehind?
  7. Plamen
    Admin
    Plamen avatar
    2954 posts

    Posted 11 Dec 2012 Link to this post

    Hi Jose,

     
    You can assess and update the controls in the template container in the ResourceHeaderCreated event as explained in this help topic.

    Hope this will be helpful.

    Kind regards,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top