Only show pdf file type when selecting a file

2 posts, 0 answers
  1. Jerry
    Jerry avatar
    45 posts
    Member since:
    Mar 2012

    Posted 13 Feb 2016 Link to this post

    Is it possible to have the control only show *.pdf files when my users are selecting files?  I know I can set it to just accept *.pdf files and it shows a red dot if it isn't a pdf, but I want to eliminate an other files that are not pdf files when selecting.


    Thank you

  2. Nencho
    Nencho avatar
    1822 posts

    Posted 17 Feb 2016 Link to this post

    Hello Jerry,

    The desired functionality could be achieved, using the accept attribute, injected in the file input. Please consider the below implementation:

    <script type="text/javascript">
               function pageLoad() {
                   $telerik.$(".ruFileInput").attr("accept", "application/pdf")

    Hope this would help.

    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 Feedback Portal and vote to affect the priority of the items
Back to Top