This is a migrated thread and some comments may be shown as answers.

add custom text along file name.

3 Answers 40 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Sameer
Top achievements
Rank 1
Sameer asked on 17 Jul 2013, 12:15 PM
Hi

On uploading files the file name is rendered below the control. There can I add custom text along with the file name?

Thanks
Sameer

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Jul 2013, 12:48 PM
Hi Sameer,

One suggestion is you can make use of the Additional Fields property to achieve your requirement. Please have a look at the JavaScript code I tried to create a label where you can give your custom text.

JavaScript:
<script type="text/javascript">
    var $ = $telerik.$;
    function onClientFileUploaded(radAsyncUpload, args) {
        var $row = $(args.get_row());
        var label = createLabel();
        $row.append(label);  
    }
    function createLabel() {
        var label = '<label>Custom Text</label>';
        return label;
    }
</script>

Thanks,
Shinu.
0
Sameer
Top achievements
Rank 1
answered on 17 Jul 2013, 07:18 PM
Thanks. This is what I needed but the custom text is appearing before the file name. I need to place the text after the file name. Please help.
0
Shinu
Top achievements
Rank 2
answered on 18 Jul 2013, 07:03 AM
Hi Sameer,

Try overriding the default CSS as follows.

CSS:
<style type="text/css">
    .ruInputs label
    {
        margin: -26px 0 0 138px !important;
        float: none !important;
        text-align: left !important;
    }  
    .RadUpload_Default .ruRemove
    {
        margin-left: 150px !important;
    }
</style>

Thanks,
Shinu.
Tags
AsyncUpload
Asked by
Sameer
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Sameer
Top achievements
Rank 1
Share this question
or