Disable or change RadUpload tool tip text

Thread is closed for posting
6 posts, 0 answers
  1. Diana
    Diana avatar
    8 posts
    Member since:
    Apr 2010

    Posted 14 Jun 2010 Link to this post

    Hi,
    I have a question about tool tip in RadUpload. After selecting a file and putting mouse over a text box, a tool tip with file name is displayed. I'd like to change this text(text should be dependent on selected file name ) or disabled this functionality. Is it possible ?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 14 Jun 2010 Link to this post

    Hello Diana,

    You can use OnClientFileSelected event of RadUpload to change the Tooltip text. Check out the following code snippet.

    ASPX:
      <telerik:RadUpload ID="RadUpload1" runat="server" OnClientFileSelected="checkExtension"
      </telerik:RadUpload> 

    Java Script:
    <script type="text/javascript"
        function checkExtension(radUpload, eventArgs) { 
            radUpload._fileInput.title = "tooltip";  
        } 
    </script> 

    Regards,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Diana
    Diana avatar
    8 posts
    Member since:
    Apr 2010

    Posted 23 Jun 2010 Link to this post

    Hi,
    This solution didn't solve a problem completely - there is still a problem in IE8. I setted tootip on empty string (radUpload._fileInput.title = "").  Generally it works ok, but sometimes, full path is showed  instead of empty text (I can't tell, when it is happened). There is one really strange bug - full path is showed always, when mouse is over bottom border of text box. Can you solve this problem ?
  5. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 28 Jun 2010 Link to this post

    Hello Diana,

    You can use the following JavaScript to workaround this problem:

    function clientFileSelected(sender, args) {
        var $ = $telerik.$;
     
        var parent = args.get_fileInputField().parentNode;
     
        $(".ruFakeInput, .ruFileInput", parent)
            .attr("title", "test");
     
    }

    <telerik:RadUpload runat="server" ID="RadUpload1" MaxFileInputsCount="1" ControlObjectsVisibility="None"
            OnClientFileSelected="clientFileSelected">



    Sincerely yours,
    Genady Sergeev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Diana
    Diana avatar
    8 posts
    Member since:
    Apr 2010

    Posted 05 Jul 2010 Link to this post

    In my application I used Telerik in version 2008.3.1105.35. Solution from your post doesn't work for this version - it gives javascript errors. Is it possible to solve this problem for this older version ?
  7. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 06 Jul 2010 Link to this post

    Hi Diana,

    The version of the controls that you use does not have jQuery hence the issue that you experience. This is the same code without jQuery (it should work with the version that you use)

    <script type="text/javascript">
            function clientFileSelected(sender, args) {
                var parent = args.get_fileInputField().parentNode;
                parent.childNodes[0].title = "test";
                parent.childNodes[1].title = "test";
            }
         
        </script>
         
     
        <telerik:RadUpload runat="server" ID="RadUpload1" OnClientFileSelected="clientFileSelected">
        </telerik:RadUpload>


    Sincerely yours,
    Genady Sergeev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017