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

Alter File Manager Dialog OnLoad

1 Answer 72 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Unified Development
Top achievements
Rank 1
Unified Development asked on 28 Jun 2010, 09:30 PM

 

 I am using the telerik:dialogopener and there are two things I would like to do onload of it.

1. Hide the folder view by triggering the collapse functionality of the splitbar.
The split bar to collapse / expand the folders has an ID of "RAD_SPLITTER_BAR_COLLAPSE_Forward_RadFileExplorer1_splitBar"
Can I force a click of it somehow?

2. Sort the files by filename (not by filetype)
Clicking the heading "Filename" sorts the files how I want, but I would like it to load that way.
I see the onlick event of it... $find('RadFileExplorer1_grid_ctl00').sort('Name'))
Can I force a click of it somehow?

Is it possible to set something with FileManagerDialogParameters or in a javascript on loading of the dialog?

thanks!

 

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 01 Jul 2010, 03:46 PM
Hi Derek,

Straight to the points:
1) You can either remove the treeview pane or collapse the slider by registering the external dialogs of Image Manager (imageManager.Parameters["ExternalDialogsPath"] = "~/EditorDialogs/";), opening the FileBrowser.ascx file and:

1.1) to remove the treeview set the VisibleControls="Toolbar,ContextMenus,AddressBox,Grid" property in the RadFileExplorer control:

<telerik:RadFileExplorer ID="RadFileExplorer1" Height="450px" Width="400px" TreePaneWidth="150px"
                runat="Server" EnableOpenFile="false" VisibleControls="Toolbar,ContextMenus,AddressBox,Grid" AllowPaging="false" />

1.2) to collapse the slider put the following JavaScript code at the end of the FileBrowser.ascx file:

<script type="text/javascript">
    function OnClientLoad() {
        setTimeout(function() {
            //$get("").click();
            $find("RadFileExplorer1_paneTree").collapse();
        }, 100);
    }
</script>

Set the OnClientLoad property of RadFileExplorer to execute the OnClientLoad function, e.g.

<telerik:RadFileExplorer ID="RadFileExplorer1" Height="450px" Width="400px" TreePaneWidth="150px"
                runat="Server" EnableOpenFile="false" OnClientLoad="OnClientLoad" AllowPaging="false" />

2) See this KB article: Sorting RadFileExplorer items by name.

Regards,
Rumen
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Unified Development
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or