RadToolTip, RadEditor and RadUpload in RadGrid edititemtemplate

3 posts, 0 answers
  1. Vincent Russell
    Vincent Russell avatar
    4 posts
    Member since:
    Apr 2007

    Posted 20 Aug 2007 Link to this post

    Hi,

    I'm trying to implement the RadToolTip control in the edit form of a RadGrid but I'm having problems assigning the TargetControlIDs for RadEditor and RadUpload controls inside edititemtemplates.  I've got it to work for RadTextBox, RadComboBox and RadDatePicker by appending "_text", "_input" and "_dateInput_text" to their ClientIDs respectively.

    Here's a sample of the code I'm using in the ItemCreated sub for the grid:

    Dim editFormItem As GridEditFormItem = TryCast(e.Item, GridEditFormItem)  
     
    Dim rttYear As RadToolTip = CType(editFormItem.FindControl("rttYear"), RadToolTip)  
    Dim rcbYear As RadComboBox = CType(editFormItem.FindControl("rcbYear"), RadComboBox)  
    rttYear.TargetControlID = rcbYear.ClientID & "_input" 

    I've tried to use the following for RadEditor and RadUpload but the tooltip never appears:

    Dim rttFile As RadToolTip = CType(editFormItem.FindControl("rttFile"), RadToolTip)  
    Dim rupFile As RadUpload = CType(editFormItem.FindControl("rupFile"), RadUpload)  
    rttFile.TargetControlID = rupFile.ClientID  
     
    Dim rttDescription As RadToolTip = CType(editFormItem.FindControl("rttDescription"), RadToolTip)  
    Dim redDescription As RadEditor = CType(editFormItem.FindControl("redDescription"), RadEditor)  
    rttDescription.TargetControlID = redDescription.ClientID 


    Can you point me in the right direction on this?

    Thanks,
    V.

  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 21 Aug 2007 Link to this post

    Hi Vincent Russell,
    Unfortunately, the controls that you mention - RadEditor and RadUpload are composite controls and as it is not clear if you set the ToolTip property where we should apply it, these controls just disregard it.

    For example, in case you set the ToolTip property of the editor, on which element do you expect it to be applied - the content area, the toolbar area or the HTML element that is the outermost element?

    And in the case of a RadUpload with the following declaration:
    <radU:RadUpload ID="RadUpload1" runat="server" InitialFileInputsCount="3" /> 
    again, on which FileUpload should the ToolTip be applied?

    Because of this limitation, even if you can add the correct ClientID to the TargetControls collection of the RadToolTipManager, how will you define the content that should be displayed in the RadToolTip? 

    In case you are using the AjaxUpdate event to set the content of the RadToolTips, you can try with the following IDs:

    1. RadEContentIframeRadEditor1, where RadEditor1 is the ClientID of the RadEditor
    2. RadUpload1file0, where RadUpload1 is the ClientID of the RadUpload and file0 stands for the first fileUpload. In case you have InitialFileInputsCount="3", you will have RadUpload1file0, RadUpload1file1, RadUpload1file2
    Best wishes,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Vincent Russell
    Vincent Russell avatar
    4 posts
    Member since:
    Apr 2007

    Posted 21 Aug 2007 Link to this post

    Thanks Tsvetie,

    It's working for me now.  I used the following code to set the TargetControlID for the RadUpload and RadEditor tooltips:

    Dim rttFile As RadToolTip = CType(editFormItem.FindControl("rttFile"), RadToolTip)  
    Dim rupFile As RadUpload = CType(editFormItem.FindControl("rupFile"), RadUpload)  
    rttFile.TargetControlID = rupFile.ClientID & "file0" 
    Dim rttDescription As RadToolTip = CType(editFormItem.FindControl("rttDescription"), RadToolTip)  
    Dim redDescription As RadEditor = CType(editFormItem.FindControl("redDescription"), RadEditor)  
    rttDescription.TargetControlID = "RadEContentIframe" & redDescription.ClientID 

    I set the tooltip for each control in the aspx page as I don't need to set it dynamically.  The reason I'm setting the TargetControlID in the code behind is because it wouldn't work when I set it in the aspx page, even with IsClientID set to true.

    Thanks again,

    V.
Back to Top