We have a page in our application that allows user to upload CSV data to our database. The actual import portion (not the upload) can be quite lengthy depending on the number of records so I am trying to use a RadProgressArea to show progress. However, when I added the RadProgressArea and RadProgressManager to my page, the FileUpload codebehind no longer runs. The dialog box opens for the user to select a file, but then the Upload() method in the code behind no longer runs:
<
button
type
=
"button"
class
=
"btn btn-alt3"
id
=
"btnOpen"
visible
=
"true"
onclick
=
"javascript:OpenFileDialog();"
> <
i
class
=
"icon s7-upload"
></
i
> Upload</
button
>
<
button
type
=
"button"
runat
=
"server"
class
=
"btn btn-alt3"
id
=
"btnUpload"
onclick
=
"javascript:ShowLoadingPanel();"
onserverclick
=
"Upload"
style
=
"visibility:hidden"
></
button
>
<
asp:FileUpload
id
=
"FileUpload1"
runat
=
"server"
style
=
"visibility:hidden"
/>
<
asp:HiddenField
runat
=
"server"
ID
=
"importType"
ClientIDMode
=
"Static"
/>
<
telerik:RadProgressManager
ID
=
"RadProgressManager1"
runat
=
"server"
/>
<
telerik:RadProgressArea
RenderMode
=
"Lightweight"
ID
=
"RadProgressArea1"
runat
=
"server"
Width
=
"500px"
/>
</
asp:Content
>
<
asp:Content
ID
=
"Content6"
ContentPlaceHolderID
=
"PageScripts_Footer"
runat
=
"server"
>
<
script
>
$(document).ready(function () {
var grid = $find("<%= grdImportData.ClientID %>");
var columns = grid.get_masterTableView().get_columns();
for (var i = 0; i <
columns.length
; i++) {
columns[i].resizeToFit();
}
});
function OpenFileDialog(fileUpload) {
document.getElementById('<%=FileUpload1.ClientID%>').click();
}
function UploadFile(fileUpload) {
if (fileUpload.value != '') {
document.getElementById("<%=btnUpload.ClientID %>").click();
}
}
It its the btnUpload.Client click call, but it never runs the code behind. If I remove the RadProgressArea and the RadProgressManager, the Upload code runs as expected.