This is a migrated thread and some comments may be shown as answers.

Tree Scroll Bar Jumps

3 Answers 83 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 02 May 2011, 05:23 PM
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?

3 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 03 May 2011, 03:50 PM
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.

0
Steve Napurano
Top achievements
Rank 1
answered on 03 Sep 2011, 09:18 PM
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>

 

0
Dobromir
Telerik team
answered on 07 Sep 2011, 10:11 AM
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.

Tags
FileExplorer
Asked by
Joel
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Steve Napurano
Top achievements
Rank 1
Share this question
or