radAsyncUpload file name get out of control width

5 posts, 0 answers
  1. Muhammad
    Muhammad avatar
    9 posts
    Member since:
    Mar 2013

    Posted 23 Feb 2014 Link to this post

    Hi all, I am using radAsyncUpload control, The problem I am facing is when a user select a file who's name is long than the file name exceeds the width of radAsyncUpload, I want the file name to be raped so that file name do not get out of radAsyncUpload border. please refer the attached screen shot.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Feb 2014 in reply to Muhammad Link to this post

    Hi Muhammad,

    Please try the following CSS code snippet which works fine at my end.

    CSS:
    <style type="text/css">
        .ruUploadSuccess
        {
            width: 220px !important;
        }
        .ruUploadFailure
        {
            width: 220px !important;
        }
    </style>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Muhammad
    Muhammad avatar
    9 posts
    Member since:
    Mar 2013

    Posted 24 Feb 2014 in reply to Shinu Link to this post


    Thank you for your reply, but this does not show the complete file name, is it possible to give a line feed when it reaches at maximum width.

    Please refer the attached screen shot

    Thanks
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Feb 2014 in reply to Muhammad Link to this post

    Hi Muhammad,

    Please try the following sample code snippet which works fine at my end.

    ASPX:
    <telerik:RadAsyncUpload OnClientFileUploaded="fileSelected" ID="RadAsyncUpload2"
        runat="server">
    </telerik:RadAsyncUpload>

    CSS:
    <style type="text/css">
        span
        {
            height: 50px !important;
            white-space: pre !important;
        }
    </style>

    JavaScript:
    <script type="text/javascript">
        function fileSelected(sender, args) {
            var $span = $telerik.$(".ruUploadProgress", args.get_row());
            var name = $span.text();
            var number = (name.length) / 2;
            if (name.length > 15) {
                var newString = name.substring(0, number) + "\n" + name.substring(number, name.length);
                $span.text(newString);
            }
        }
    </script>

    Thanks,
    Shinu.
  6. Muhammad
    Muhammad avatar
    9 posts
    Member since:
    Mar 2013

    Posted 25 Feb 2014 in reply to Shinu Link to this post

    hi,
        Thank you for your time.

    I have checked the code, and it is working as expected with just a little change

    I used OnClientFileSelected event instead of OnClientFileUploaded.

    Thanks
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017