Skip Navigation LinksHome / Community & Support / Code Library / ASP.NET and ASP.NET AJAX > FileExplorer > Connect RadFileExplorer or RadEditor to a SQL databse

Not answered Connect RadFileExplorer or RadEditor to a SQL databse

Feed from this thread
  • Posted on Dec 1, 2009 (permalink)

    Requirements

    RadControls version ASP.NET AJAX
    .NET version 2.0
    Visual Studio version 2005 / 2008
    programming language C# / VB.NET
    browser support

    all browsers supported by RadControls


    PROJECT DESCRIPTION
    Connect RadFileExplorer or RadEditor to a SQL databse.

    If you have installed the Telerik RadControls for ASP.NET AJAX, then the Telerik.MDF database file is located in:
    INSTALL_FOLDER\Telerik\RadControls for ASP.NET AJAX (VERSION)\Live Demos\App_Data folder.

    Reply

  • Bob Paul avatar

    Posted on Dec 4, 2009 (permalink)

    thank you very much!

    Reply

  • Lester avatar

    Posted on Feb 4, 2010 (permalink)

    Hello.

    Do you have some sample about using fileexplorer with webservices ?

    I am trying to connect the fileexplorer to a webservice but i am receiving the following error ( using telerik ASP.NET Ajax Q3 2009 ):

    To be XML serializable, types which inherit from ICollection must have an implementation of Add(System.String) at all levels of their inheritance hierarchy. System.Collections.Specialized.NameValueCollection does not implement Add(System.String).

    [InvalidOperationException: There was an error reflecting type 'Telerik.Web.UI.Widgets.DirectoryItem'.]
    

    This is my code inside a webservice
     
            [WebMethod] 
            public Telerik.Web.UI.Widgets.DirectoryItem GetDirectory(string _dir, string fullPath, string[] UploadPaths, string[] DeletePaths, string[] SearchPatterns, bool _includeFiles, bool _includeDirectories, bool _IsListMode, string _SelectedUrl) 
            { 
     
                    // IO.directoryinfo cant be serialized, so receive string and create the directoryinfo object here 
                    DirectoryInfo _dir = new DirectoryInfo(dir); 
     
                    PathPermissions permissions = GetPermissions(fullPath, UploadPaths,  DeletePaths); 
     
                    DirectoryItem[] subdirectories = _includeDirectories ? GetDirectories(_dir, fullPath,UploadPaths, DeletePaths,SearchPatterns ) : new DirectoryItem[] { }; 
                    FileItem[] files = _includeFiles ? GetFiles(_dir, permissions, fullPath + "/",SearchPatterns) : new FileItem[] { }; 
     
                   string tag = _IsListMode ? fullPath : string.Empty; 
                    return new DirectoryItem(_dir.name, string.Empty, fullPath, tag, permissions, files, subdirectories); 
                
            } 
     


    Reply

  • Fiko Fiko avatar

    Posted on Feb 9, 2010 (permalink)

    Hello Lester,

    The classes inside the Telerik.Web.UI.Widgets namespace cannot be returned from a web method, because they contain a field of type NameValueCollection which is not XML serializable. In your case you need to design your classes that will be return as result from the webmethods. Then you need to use the returned custom classes and instantiate the classes from Telerik.Web.UI.Widgets namespace inside the custom provider.

    I hope this helps.

    Sincerely yours,
    Fiko
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.

    Reply

  • Stephen Kumor avatar

    Posted on Mar 15, 2010 (permalink)

    Hello Telerik Team,
    I love this example.  Unfortunately, I am forced to use oracle as a database.  Would you happen to have an example that uses oracle.  To go even further I need to use either a RadFileExplorer or a RadUploader to store and have the ability to view files.  This would be nice to do in a grid because I need the files to be associated to the user that submitted them and the files are hierarchical to another table within oracle.  For example, user A submits a file that associates with Row 1 in another table.  Hopefully I made myself clear.

    Thanks in advance,
    Stephen 

    Reply

  • Lini Lini admin's avatar

    Posted on Mar 18, 2010 (permalink)

    Hello Stephen,

    I think the database provider only uses ANSI SQL, so it is not dependent on the DBMS you are using. If you wish to use Oracle, you should simply replace System.Data.SqlClient classes in the DataServer.cs/DataServer.vb file with the ones from the Oracle Data Provider for ASP.NET. The database content provider for RadFileExplorer stores everything in a single table - no files or folders are referenced on the server's file system. To download the files in the browser, a special handler (Handler.ashx) is used. The handler queries the database and streams back the file so it is displayed in the user's browser.

    Greetings,
    Lini
    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.

    Reply

  • Rohan avatar

    Posted on May 11, 2012 (permalink)

    I want create custom content provider for telerik file explore  which get data from the database table . I refereed yours provided example for that , its working fine but its is got getting different levels of file and folder how can i dot this .... please help us .........

    Reply

  • Dobromir Dobromir admin's avatar

    Posted on May 15, 2012 (permalink)

    Hi Rohan,

    I already answered to your post in the other forum thread on the same subject.

    http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/radfileexplorer-problem-dbcontentprovider.aspx#2109388

    Greetings,
    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.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Code Library / ASP.NET and ASP.NET AJAX > FileExplorer > Connect RadFileExplorer or RadEditor to a SQL databse