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

PatternSearch with Session Variable

2 Answers 61 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Kurt Kluth
Top achievements
Rank 1
Kurt Kluth asked on 27 Sep 2018, 03:10 PM

I would like to filter the FileExplorer results by combining a Session variable id and the remainder of the string.  

We have a IssueID and a issue may have files associated with it.  Once a supporting document file is uploaded it will have "<issueID>_" appended to the front, ie. 1009_myfile.txt.  I need the search pattern to be something like Session("IssueID") & "_*.*".  

How do I go about doing this?  

Here is code the client-side control

<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server"
    EnableCreateNewFolder="false" Height="225" Width="890" EnableAsyncUpload="false">
    <Configuration ViewPaths="/SupportingDocs/" DeletePaths="/SupportingDocs/" />
</telerik:RadFileExplorer>

 

Tried the following in my code behind in the Page Load to no avail.  

Dim searchPatterns As String() = RadFileExplorer1.Configuration.SearchPatterns
searchPatterns = Session("IssueID") & "_*"
RadFileExplorer1.Configuration.SearchPatterns = searchPatterns

 

2 Answers, 1 is accepted

Sort by
0
Kurt Kluth
Top achievements
Rank 1
answered on 01 Oct 2018, 07:30 PM

It is now figured out as I simplified the code:

RadFileExplorer1.Configuration.SearchPatterns = New String() {Session("IssueID") & "_*.*"}
0
Vessy
Telerik team
answered on 02 Oct 2018, 11:50 AM
Hi Kurt,

I am glad you have find how to configured the target behavior. Another possible option would be to filter the files (and folders in this case) like demonstrated here:
https://demos.telerik.com/aspnet-ajax/fileexplorer/examples/applicationscenarios/filteranddownloadfiles/defaultcs.aspx

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
FileExplorer
Asked by
Kurt Kluth
Top achievements
Rank 1
Answers by
Kurt Kluth
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or