RadFileExplorer select file server-event

5 posts, 0 answers
  1. d-cpt
    d-cpt avatar
    59 posts
    Member since:
    Mar 2008

    Posted 21 Feb 2011 Link to this post

    I know RadFileExplorer has client-side script for select file.
    Does it has server-side event for select file?

  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 24 Feb 2011 Link to this post

    Hi d-cpt,

    At present, RadFileExplorer does not offer a server-side event FileSelect. However, you can simulate raising server-side event, by invoking a postback in the OnClientItemSelected client-side event, e.g.:
    <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" OnClientItemSelected="OnClientItemSelected">
        <Configuration ViewPaths="~/ROOT" />
    <script type="text/javascript">
        function OnClientItemSelected(sender, args)
            //ItemSelected event is fired on click on item - this include the double click on a folder
            //invoke the postback only if the selected item is file
            if (args.get_item().get_type() == Telerik.Web.UI.FileExplorerItemType.File)

    Please note that ItemSelected client-side event is fired when user tries to open a folder by double-click on the grid.

    Kind regards,
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. d-cpt
    d-cpt avatar
    59 posts
    Member since:
    Mar 2008

    Posted 25 Feb 2011 Link to this post

    Dear Dobromir,

    Thank you so much for your help.


  4. Sebastien
    Sebastien avatar
    2 posts
    Member since:
    Dec 2010

    Posted 09 Feb 2014 in reply to Dobromir Link to this post


    This is exactly what I have done (I also need to call a server side function when selecting a file) and it is working. But I have noticed that by doing so, I cannot see the context menu when right-clicking on a file in the grid: in fact the OnClientItemSelected is fired when doing a left click or a right click on a file in the grid. Is there a way to detect (in the method called on the OnClientItemSelected event) if the file has been left or right clicked ? (I have tried to inspect the args and the sender objects filled when the event is raised but I have not seen anything)

    Thanks a lot for your help

  5. Vessy
    Vessy avatar
    2127 posts

    Posted 12 Feb 2014 Link to this post

    Hi Sebastien,

    This behavior is expected and, unfortunately, there is no way to determine which is the mouse button, triggering the ItemSelected event. Does your server functionality update the FileExplorer? In case it does not, I could suggest you to use button placed inside an external update panel (not wrapped around the FileExplorer) and implement the desired logic by updating it (for example using a hidden button).

    Veselina Raykova
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top