I have a file explorer on my page that is filtering files based on a sql pull. However what happens is that I use the async uploader to upload files then show in only grid view in the file explorer. When I post back though nothing show in the file explorer, it says no files avialable even though I uploaded files or there where previous files in there.
Protected Sub lnkSubmitRequest_Click(sender As Object, e As EventArgs) Handles lnkSubmitRequest.Click
Code to submit the page
This statment reloads all the information on the page if its changed from the database
LoadPriorService(Convert.ToInt32(HFRecruit.Value))
End If
Private Sub LoadRecruit(ByVal recruitId As Integer)
Reload the page
This statement is where the FileExplorer is located on the LoadPriorService but I have no command to actually reload the control on a postback.
LoadPriorService(recruitId)
Else
ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "OpenWindow", "NoData();", True)
End If
Private Sub LoadPriorService(ByVal recruit As Integer)
ClearPriorSvc()
sql = "Select intPriorServiceId, intBranchServiceId, dtDischarge, bitSF180, bitStaterequest, bitArpercen, bitredd, strNotes, dtSubmitted, submittedBy, dtCompleted, CompletedBy, strRocComments " _
& "from vw_PriorService where intRecruitId = " & recruit
myDataTable = New DataTable
myDataTable = getReader(sql)
If myDataTable.Rows.Count > 0 Then
HFPriorService.Value = myDataTable.Rows(0)(0)
ddlBranchService.SelectedValue = myDataTable.Rows(0)(1)
txtDtDischarge.Text = myDataTable.Rows(0)(2)
If myDataTable.Rows(0)(3) = "1" Then
cbSF180.Checked = True
End If
If myDataTable.Rows(0)(4) = "1" Then
cbState.Checked = True
End If
If myDataTable.Rows(0)(5) = "1" Then
cbArpercen.Checked = True
End If
If myDataTable.Rows(0)(6) = "1" Then
cbREDD.Checked = True
End If
txtPriorNotes.Text = myDataTable.Rows(0)(7)
lblSubmittedON.Text = myDataTable.Rows(0)(8)
lblSubmittedBy.Text = myDataTable.Rows(0)(9)
lblCompletedOn.Text = myDataTable.Rows(0)(10)
lblCompletedBy.Text = myDataTable.Rows(0)(11)
txtRocNotes.Text = myDataTable.Rows(0)(12)
lnkSubmitRequest.Enabled = True
Else
lblSubmittedON.Text = "None Submitted"
lblSubmittedBy.Text = "None Submitted"
End If
End Sub
Here is the code that loads the fileExplorer, it seems to only load on the initial page loads and bugs out on postback.
Private Sub radFileExplorer_ExplorerPopulated(sender As Object, e As RadFileExplorerPopulatedEventArgs) Handles radExplorer.ExplorerPopulated
'If HFPriorService.Value > "" Then
sql = "Select strUrl from PriorServiceUpload where intPriorServiceId = " & HFPriorService.Value
myDataTable = New DataTable
myDataTable = getReader(sql)
If myDataTable.Rows.Count > 0 Then
If e.ControlName = "grid" Then
Dim items As List(Of FileBrowserItem) = e.List
Dim i As Integer = 0
For Each row As DataRow In myDataTable.Rows
While i < items.Count
If Not items(i).Name.Contains(row(0)) Then
items.Remove(items(i))
Else
i += 1
End If
End While
Next
End If
End If
'End If
End Sub