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

No paging works, the filter or sort

6 Answers 74 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Marcelo
Top achievements
Rank 1
Marcelo asked on 15 Feb 2013, 01:24 PM
I have a RadFileExplorer on mi app. I want show a  different   folder for each kind of use.
So, I set the viewpath dinamically. I created a mapping file Beacause the folders aren't on my app's  directory.
The RadFileEplorer shows the files, but  the paging doesn't works, and  always show me the same files.
 The Filtering  and the  sorting doesn't  works neither.  
  
 You can see in the atached files ,  the pagination shows same files on the first and on the second page.               
                 
here is The mapping File, it looks well and works.
<?xml version="1.0" encoding="utf-8" ?>
<CustomFileBrowserProvider>
  <Paths>
    <genericHandlerPath>FileSystemHandler.ashx</genericHandlerPath>
  </Paths>
  <Mappings>
    <Mapping>
      <PhysicalPath><![CDATA[ D:\MarceloEscobar\Descargas del Reloj\Central]]></PhysicalPath>
      <VirtualPath><![CDATA[descargascentral]]></VirtualPath>
    </Mapping>
  </Mappings>
</CustomFileBrowserProvider>

Here is the RadFileExplore declaration 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="progress">
            <telerik:RadFormDecorator ID="FormDecorator1" runat="server" Skin="Office2007" />
            <asp:Label runat="server" Font-Size="Large" ID="lblEncabezado" CssClass="label" Text="Incorporar Archivos del Reloj:" />
             <telerik:RadFileExplorer ID="FileExplorer1" runat="server" DisplayUpFolderItem="false" AllowPaging="true" EnableOpenFile="true" PageSize="7"   EnableAsyncUpload="false" EnableCopy="false" EnableCreateNewFolder="false" Height="310px" OnClientFileOpen="OnClientFileOpen" OnClientMove="OnClientMove" Skin="Office2007" VisibleControls="Grid" Width="600px">
                <Configuration  SearchPatterns="*.REI" />
            </telerik:RadFileExplorer>
                 <br />


and here is mi code.

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim ruta = "descargascentral"
            FileExplorer1.Configuration.ContentProviderTypeName = _
            GetType(CustomFileSystemProvider).AssemblyQualifiedName
            Dim rutas As String() = New String() {ruta}
            FileExplorer1.Grid.ClientSettings.AllowRowsDragDrop = False
            FileExplorer1.Configuration.ViewPaths = rutas
            FileExplorer1.Grid.ClientSettings.Scrolling.AllowScroll = True
        End If
End Sub


I can't set the initialpath property because i don't know if the folder contais files or no.

   thanks for your helping

update: also doesn't allow me to navigate within subfolders.

6 Answers, 1 is accepted

Sort by
0
MasterChiefMasterChef
Top achievements
Rank 2
answered on 15 Feb 2013, 04:17 PM
Hi Marcelo,

It sounds like you are having trouble loading the directory once you change pages in Telerik's RadFileExplorer. As you can see in the documentation here, when a directory is loaded the FileExplorer is using an AJAX Callback("Directory load on demand loading using ASP.NET 2.0 AJAX Callback mechanism"). In your page load function, it seems you are only passing the FileExplorer the directory when it is 
not a postback. It may benefit you to check if the page.IsCallback property, and then pass the directory back to the FileExplorer.

Hopefully this helps,
Master Chief
0
Marcelo
Top achievements
Rank 1
answered on 15 Feb 2013, 05:41 PM
thanks for responding, 
please can you give an example?
 I tried a lot of things and i haven't  got it so clear .
thanks  again.
0
MasterChiefMasterChef
Top achievements
Rank 2
answered on 15 Feb 2013, 06:04 PM
No problem, I'm not sure if this will even help, but it will at least fire when there is an AJAX Callback request. I just copied over your original function into a Page.IsCallback property. Try this out and see if it helps re-bind the data during the Callback.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim ruta = "descargascentral"
            FileExplorer1.Configuration.ContentProviderTypeName = _
            GetType(CustomFileSystemProvider).AssemblyQualifiedName
            Dim rutas As String() = New String() {ruta}
            FileExplorer1.Grid.ClientSettings.AllowRowsDragDrop = False
            FileExplorer1.Configuration.ViewPaths = rutas
            FileExplorer1.Grid.ClientSettings.Scrolling.AllowScroll = True
        End If
        If Page.IsCallback Then
            Dim ruta = "descargascentral"
            FileExplorer1.Configuration.ContentProviderTypeName = _
            GetType(CustomFileSystemProvider).AssemblyQualifiedName
            Dim rutas As String() = New String() {ruta}
            FileExplorer1.Grid.ClientSettings.AllowRowsDragDrop = False
            FileExplorer1.Configuration.ViewPaths = rutas
            FileExplorer1.Grid.ClientSettings.Scrolling.AllowScroll = True
        End If
End Sub


Good luck,
Master Chief
0
Marcelo
Top achievements
Rank 1
answered on 16 Feb 2013, 11:29 AM
Thanks but still not working.
I'm pretty sure it has to do with the source folder.
 Because when the folder is inside the application works perfect.
I will keep trying.
Thanks.
0
Marcelo
Top achievements
Rank 1
answered on 18 Feb 2013, 11:45 AM
I  trying to find the solution but, i have the same issue. Please can help me somebody.
0
Dobromir
Telerik team
answered on 19 Feb 2013, 03:53 PM
Hi Marcelo,

As I can see from the provided sample code you are using CustomContentProvider. If this is correct could you please verify that you have overridden the CheckReadPermissions method and if it returns the correct value?

If you do have correct override and the you still experience this behavior, could you please open a formal support ticket and provide sample fully runnable project reproducing the problem so we can examine and debug it locally?

All the best,
Dobromir
the Telerik team
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
FileExplorer
Asked by
Marcelo
Top achievements
Rank 1
Answers by
MasterChiefMasterChef
Top achievements
Rank 2
Marcelo
Top achievements
Rank 1
Dobromir
Telerik team
Share this question
or