AsyncUpload - Additional Fields

3 posts, 0 answers
  1. Wulong
    Wulong avatar
    2 posts
    Member since:
    Jun 2013

    Posted 02 Jul 2013 Link to this post

    Hello, I have a question regarding this demo http://demos.telerik.com/aspnet-ajax/asyncupload/examples/additionalfields/defaultcs.aspx
    If I have a requirement to add additional field as Radio Button List Options. Using this similar demo, How would I extend it? thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Jul 2013 Link to this post

    Hi Wulong,

    Please have a look at the following JavaScript code i tried.

    JavaScript:
    <script type="text/javascript">
        var $ = $telerik.$;
     
        function onClientFileUploaded(radAsyncUpload, args) {
            var $row = $(args.get_row());
            var inputName = radAsyncUpload.getAdditionalFieldID("TextBox");
            var inputName1 = radAsyncUpload.getAdditionalFieldID("RadioButton");
            var inputType = "text";
            var inputID = inputName;
            var input = createInput(inputType, inputID, inputName);
            var label = createLabel(inputID);
            var radio1 = createRadioButton(inputName1, "1", "Option1");
            var radio2 = createRadioButton(inputName1, "2", "Option2");
            var radio3 = createRadioButton(inputName1, "3", "Option3");
            $row.append("<br/>");
            $row.append(label);
            $row.append(input);
            $row.append(radio1);
            $row.append(radio2);
            $row.append(radio3);
        }
     
        function createInput(inputType, inputID, inputName) {
            var input = '<input type="' + inputType + '" id="' + inputID + '" name="' + inputName + '" />';
            return input;
        }
     
        function createLabel(forArrt) {
            var label = '<label for=' + forArrt + '>File info: </label>';
            return label;
        }
        function createRadioButton(inputName1, value, text) {
            var radioButton1 = '<input type="radio" id="' + inputName1 + '" name="' + inputName1 + '" value="' + value + '" />' + text + '';
            return radioButton1;
        }
    </script>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Wulong
    Wulong avatar
    2 posts
    Member since:
    Jun 2013

    Posted 08 Jul 2013 Link to this post

    works good. thanks for your help.
Back to Top