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

File explorer Gridview MasterTable

2 Answers 42 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
sandee
Top achievements
Rank 1
sandee asked on 03 Jul 2015, 05:17 AM

Hi Guys,

 Im working on Radfileexplorer I'm facing so many problems, My problem is like  that I want assign the datasource to file explorer  inside gridview how to assign  the datasource to RadfileExplorer mastertable view its getting error here is the code  . can you please help me .

 

                GridBoundColumn  Id = new GridBoundColumn();
                rdFileExplorer.Grid.MasterTableView.Columns.Add(JobFileId);
              Id .HeaderText = "Id";
              Id .UniqueName = "Id";
              Id .DataField = "Id";
               Id .SortExpression = "Id";

        
              GridBoundColumn Name = new GridBoundColumn();
              Name .Grid.MasterTableView.Columns.Add(JobFileId);
              Name .HeaderText = "Name";
              Name .UniqueName = "Name";
              Name .DataField = "Name ";
              Name .SortExpression = "Name";

                rdFileExplorer.Configuration.ContentProviderTypeName = typeof(Telerik.Web.UI.Widgets.FileSystemContentProvider).AssemblyQualifiedName;
                rdFileExplorer.InitialPath = Convert.ToString(folders.GetValue(0));
                rdFileExplorer.Configuration.ViewPaths = folders;
                rdFileExplorer.Configuration.DeletePaths = folders;
                rdFileExplorer.Configuration.UploadPaths = folders;
                rdFileExplorer.Configuration.MaxUploadFileSize = 10485760;
                rdFileExplorer.GridContextMenu.OnClientShown = "OnClientContextMenuShown";
                rdFileExplorer.Grid.AutoGenerateColumns = false;
                rdFileExplorer.Grid.MasterTableView.DataSource = ds.Tables[0].DefaultView;
                rdFileExplorer.Grid.MasterTableView.DataBind();

Its getting  error im unable to  assign the datakey names.

Can you please help me how to assign the datasource.

2 Answers, 1 is accepted

Sort by
0
sandee
Top achievements
Rank 1
answered on 03 Jul 2015, 05:20 AM
folder path is came from database values.
0
Accepted
Vessy
Telerik team
answered on 07 Jul 2015, 03:09 PM
Hello sandee,

Is there a chance that you configuring the paths of FileExplorer after the PageLoad event? If so, please note that Page_Load is the latest moment of the page life cycle in which the FileExplorer can be configured, otherwise its child controls will not be bound properly.

If this is not the case, can you provide a little more information regarding the exact scenario in which the control is used?
  • What is the content provider assigned to your FileExplorer and what is the custom functionality you are implementing in it?
    rdFileExplorer.Configuration.ContentProviderTypeName = typeof(Telerik.Web.UI.Widgets.FileSystemContentProvider).AssemblyQualifiedName;
  • What is the type of the values received from your database? Can you verify that they represent virtual paths to folders placed inside the application folder?

Looking forward to receiving a reply from you,
Vessy
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
FileExplorer
Asked by
sandee
Top achievements
Rank 1
Answers by
sandee
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or