RadUpload - MaxFileInputsCount includes additional fields in count

Thread is closed for posting
2 posts, 0 answers
  1. Marbry
    Marbry avatar
    123 posts
    Member since:
    Aug 2012

    Posted 25 Aug 2011 Link to this post

    I would think that the MaxFileInputsCount would be the count of actual files allowed, but not always.  As with the example below, adding a description field, the count is apparently twice the number of actual file inputs added.

    So to allow 5 file inputs for example, you would need to set MaxFileInputsCount to 10 in this particular case.

    I'm assuming this is from the addition of the description field, I haven't tested it with other scenarios using additional fields.

    function OnClientAddedHandler(sender, eventArgs)
        var inputRow = eventArgs.get_row();
        var uList = inputRow.parentNode;
        var count = 0;
        // add a new row for the description field
        newRow = document.createElement("li");
        uList.insertBefore(newRow, inputRow);
        var label = document.createElement("span");
        label.innerHTML = "Description: ";
        label.style.fontSize = 12;
        label.id = label.name = sender.getID("DescLabel");
        input = document.createElement("input");
        input.type = "text";
        input.id = input.name = sender.getID("DescValue");
  2. Peter Filipov
    Peter Filipov avatar
    1028 posts

    Posted 30 Aug 2011 Link to this post

    Hello Marbry,

    I reproduced your issue. It happens because you create "li" elements and append them before the "inputRow" element.

    Please review the following video. To avoid that issue use the approach implemented in our demo.

    Kind regards,
    Peter Filipov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft R3 2016 release webinar banner
Back to Top