Tree Scroll Bar Jumps

4 posts, 0 answers
  1. Joel
    Joel avatar
    1 posts
    Member since:
    Aug 2010

    Posted 02 May 2011 Link to this post

    I'm using the FileExplorer in FileTree mode, and when I click on a file, the tree scrolls to the top, which prevents me from double clicking on the file to open it.  This only occurs in Internet Explorer.

    Any suggestions or help?
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 03 May 2011 Link to this post

    Hi Joel,

    This issue is not directly related with the RadFileExplorer but is a default browser behavior. When an element with set TabIndex attribute is focused Internet Explorer is calling scrollIntoView() to ensure that the element is in the viewport.

    The TabIndex attribute is set to the RadFileExplorer's elements in order to allow Keyboard navigation. At present, RadFileExplorer does not offer a property to disable the keyboard support, we have this to our ToDo list.

    For the time being, you can use the following JavaScript to avoid this behavior:
    Sys.Application.add_load(function ()
    {
        setTimeout(function ()
        {
            var explorer = $find("<%= RadFileExplorer1.ClientID %>");//get reference to the RadFileExplorer
            var tree = explorer.get_tree();//get reference to the TreeView component
     
            var treeWrapper = tree.get_element();
     
            treeWrapper.removeAttribute("tabIndex");
        }, 100);
    });


    All the best,
    Dobromir
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Steve Napurano
    Steve Napurano avatar
    40 posts
    Member since:
    Aug 2009

    Posted 03 Sep 2011 Link to this post

    HI Im using this code. It worked fine when I had it in a masterpage but now its IN the page itself (removed masterpage) and NOW im getting sys is undefined..

    Thanks!!!

    <

     

    telerik:RadScriptBlock runat="server" ID="radScript">

     

     

    <script type="text/javascript">

     

    Sys.Application.add_load(

    function() {

     

    setTimeout(

    function() {

     

     

    var explorer = $find("<%= FileExplorer1.ClientID %>"); //get reference to the RadFileExplorer

     

     

    var tree = explorer.get_tree(); //get reference to the TreeView component

     

     

    var treeWrapper = tree.get_element();

     

    treeWrapper.removeAttribute(

    "tabIndex");

     

    }, 100);

    });

     

    </script>

     

     

    </telerik:RadScriptBlock>

     



    <

     

    telerik:RadFileExplorer runat="server" ID="FileExplorer1" Skin="Black" Width="635px" Height="550px" EnableOpenFile="false"

     

     

    TreePaneWidth="245px" EnableCopy="false" OnClientItemSelected="OnClientItemSelected" VisibleControls="Grid,Toolbar,Treeview">

     

     

    <Configuration MaxUploadFileSize="1572846" UploadPaths="~/" ViewPaths="~/" SearchPatterns="*.jpg,*.png,*.gif,*.jpeg,*.bmp"/>

     

     

    </telerik:RadFileExplorer>

     

  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 07 Sep 2011 Link to this post

    Hi Steve,

    The error message "Sys is undefined"  error message indicates that the MSAjax framework files are not loaded when the custom script is parsed. To ensure that custom JavaScript will be registered after the MSAjax scripts you need to place the custom JavaScript after the registration of the ScriptManager, e.g.:
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadScriptBlock runat="server" ID="radScript">
        <script type="text/javascript">
            Sys.Application.add_load(
                function () {
                    setTimeout(
                        function () {
                            var explorer = $find("<%= FileExplorer1.ClientID %>"); //get reference to the RadFileExplorer
                            var tree = explorer.get_tree(); //get reference to the TreeView component
                            var treeWrapper = tree.get_element();
                            treeWrapper.removeAttribute("tabIndex");
                        }, 100);
                });
        </script>
    </telerik:RadScriptBlock>
    <telerik:RadFileExplorer runat="server" ID="FileExplorer1" Skin="Black" Width="635px"
        Height="550px" EnableOpenFile="false" TreePaneWidth="245px" EnableCopy="false"
        OnClientItemSelected="OnClientItemSelected" VisibleControls="Grid,Toolbar,Treeview">
        <Configuration MaxUploadFileSize="1572846" UploadPaths="~/" ViewPaths="~/" SearchPatterns="*.jpg,*.png,*.gif,*.jpeg,*.bmp" />
    </telerik:RadFileExplorer>

    If this is not the case, could you please open a formal support ticket and provide a sample page reproducing the problem?

    All the best,
    Dobromir
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top