I have added a progress bar to one of my pages to monitor when a custom process is complete. I used the code from the demo Upload/Monitoring For Custom Progess.
The progress bar opens and works great, but it doesn't close when the process is complete. After reading the other threads concerning the Progress Bar not closing, I thought the problem might be that something in the procedure I am calling was preventing the Progress Bar from closing, so I commented out that line and ran it again and the Progress Bar still doesn't close.
Did I miss something in the example or is there a way to manually close or stop the progress bar?
Thanks
Here is the aspx code
<
telerik:RadProgressArea
ID="RadProgressArea1"
runat="server"
HeaderText = "Creating PDF Files For Invoices"
DisplayCancelButton="True"
ProgressIndicators="FilesCountBar,
FilesCount,
FilesCountPercent,
SelectedFilesCount,
CurrentFileName,
TimeElapsed,
TimeEstimated"
Skin="Hay">
<Localization Uploaded="Uploaded" />
</telerik:RadProgressArea>
<telerik:RadProgressManager ID="RadProgressManager1"
Runat="server"
SuppressMissingHttpModuleError="True"
RefreshPeriod="100" />
Here is the code on the button click
Private
Sub ibtPDFExport_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ibtPDFExport.Click
Dim aryInvoiceNumber() As String
Dim i As Integer = 0
Dim SqlStr As String = Nothing
Dim sdrIntranetObjects As SqlDataReader
Dim strDirectorySuffix As String = Nothing
Dim strFileName As String = Nothing
If Me.txtRecordsSelectedCount.Text = "0" Then
MsgBox(
"You must select at least 1 invoice to export.", vbOKOnly)
Else
Dim Progress As RadProgressContext = RadProgressContext.Current
Progress.Speed =
"N/A"
ReDim aryInvoiceNumber(Convert.ToInt16(Me.txtRecordsSelectedCount.Text) - 1)
For i = 0 To Convert.ToInt16(Me.txtRecordsSelectedCount.Text) - 1
aryInvoiceNumber(i) = Split(
Me.txtRecordsSelected.Text, ";")(i).ToString
SqlStr =
"SELECT InvoiceNumber, PeriodEnding, Contract, Customer From [dbo].BLL_BillingInvoiceHeader WHERE InvoiceNumber = '" & aryInvoiceNumber(i).ToString & "'"
sdrIntranetObjects = UDF_GetDataReader(SqlStr)
While sdrIntranetObjects.Read()
strDirectorySuffix = sdrIntranetObjects(
"Customer") & "\" & sdrIntranetObjects("Contract") & "\"
strFileName =
String.Format("{0:yyyy-MM}", sdrIntranetObjects("PeriodEnding")).ToString & "~" & sdrIntranetObjects("InvoiceNumber")
End While
sdrIntranetObjects.Close()
Progress.SecondaryValue = i + 1.ToString()
Progress.SecondaryPercent = ((i + 1) / Convert.ToInt16(
Me.txtRecordsSelectedCount.Text)).ToString()
Progress.CurrentOperationText = strDirectorySuffix +
"\" & strFileName
Progress.SecondaryTotal = Convert.ToInt16(
Me.txtRecordsSelectedCount.Text)
If Not Response.IsClientConnected Then
'Cancel button was clicked or the browser was closed, so stop processing
Exit For
End If
USB_CreatePDFReport(70001,
"no", strDirectorySuffix, strFileName, aryInvoiceNumber(0).ToString)
Next
End If
End Sub