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

RadProgressArea not representing files in RadAsynchUpload

4 Answers 20 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
License
Top achievements
Rank 1
License asked on 04 Nov 2015, 09:21 PM

I have a multiple document upload page in which a cancel button can be clicked before all the files selected are finished uploading. Along with this, I am utilizing the RadProgressManager and RadProgressArea to display the progress. When clicking cancel, I am clearing the file list in the code behind and hiding the upload panel then showing the document list. When I click to upload again and toggle the panels the RadProgressArea is still displaying with the same information that it had stopped at when clicking the cancel button. The upload procedure continues to work but the Progress never updates. If I click cancel after all the files upload, everything works as expected. I know there is functionality to suppress a postback until file uploads are completed this but I'd prefer to allow this.

 I have tried ​enabling/disabling the RadProgressManager and RadProgressArea, manually updating the ProgressData client side to reset it.

 

Any help would be appreciated.

4 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 09 Nov 2015, 12:30 PM
Hello Robert,

When you have a progress area on the page we recommend to use it only for one thing - file upload or process monitoring. Our advice is to separate the two concepts on different page.

Regards,
Peter Filipov
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
0
License
Top achievements
Rank 1
answered on 09 Nov 2015, 09:02 PM

Sorry if my original post wasn't clear. I am only using the RadProgressArea to monitor file uploads. Here is the basic layout of the page. Again, two panels that are toggled on and off so the cancel button isn't the cancel button included in the RadProgressArea. It's just a button that toggles the panels and does not actually upload the data. In the code behind, when this click event is triggered, I clear the uploaded files from the RadAsynchUpload. At that point the RadProgressArea no longer matches the RadAsynchUpload file list. It stays wherever it was when the cancel button was clicked.

 The best I can determine, this is happening because polling begins when I start uploading files and the data is being stored somewhere by the RadUploadHandler.ashx file. When I click cancel, the data stays in this file and the RadProgressArea is still reading the data. I could be way off base but I would think that if I could manually reset this data, I would be good to go.

 

Here is some basic code showing the structure of my page:

 <asp:Panel ID="pnlDocuments" runat="server">
      <asp:Button id="btnMultipleDocumentUpload" runat="server>
                Upload Multiple Documents
      </asp:button>
        <telerik:RadGrid ID="rgDocuments" runat="server">
            <ClientSettings>
                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
            </ClientSettings>
            <SortingSettings SortToolTip="" />
            <MasterTableView AllowCustomSorting="True" AllowSorting="True" AllowNaturalSort="false"
                AutoGenerateColumns="false" Width="100%" NoMasterRecordsText="No Documents to Display"
                TableLayout="Fixed">
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="modified_dt" SortOrder="Descending" />
                </SortExpressions>
                <ItemStyle Wrap="false" />
                <Columns>
                    <telerik:GridTemplateColumn HeaderText="Document Name" ItemStyle-HorizontalAlign="Left"
                        UniqueName="document_name" SortExpression="document_name">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnDocumentName" runat="server" CommandName="open" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn HeaderText="Document Type" HeaderStyle-Width="130px" ItemStyle-HorizontalAlign="Left"
                        DataField="document_type" UniqueName="document_type" SortExpression="document_type" />
                    <telerik:GridDateTimeColumn HeaderText="Date Modified" HeaderStyle-Width="75px" ItemStyle-HorizontalAlign="Center"
                        DataField="modified_dt" UniqueName="modified_dt" SortExpression="modified_dt" DataType="System.DateTime"
                        DataFormatString="{0:MM/dd/yy}" />
                    <telerik:GridBoundColumn HeaderText="Attached By" HeaderStyle-Width="180px" ItemStyle-HorizontalAlign="Left"
                        DataField="modified_by_name" UniqueName="modified_by_name" SortExpression="modified_by_name" />
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </asp:Panel>

 <asp:Panel ID="pnlMultipleDocumentUpload" runat="server" Visible="false">
                            <telerik:RadAsyncUpload ID="rauMultipleDocument" runat="server" CssClass="MulitpleDocument"
                                MultipleFileSelection="Automatic" Skin="" Height="100%" UploadedFilesRendering="BelowFileInput"
                                HideFileInput="true" PostbackTriggers="btnMultipleDocumentUpload"
                                OnClientFileSelected="onClientMultipleFileSelected" OnClientFilesSelected="onClientMultipleFilesSelected"
                                OnClientFileUploaded="onClientMultipleFileUploaded" OnClientFilesUploaded="onClientMultipleFilesUploaded"
                                OnClientFileUploadRemoved="onClientMultipleFileUploadRemoved"
                                Style="float: left;">

                            <Localization Select="Select Documents..." />

                            </telerik:RadAsyncUpload>

                            <telerik:RadProgressArea runat="server" ID="rauMultipleDocumentProgressArea"
         ProgressIndicators="TotalProgress,TotalProgressPercent,TotalProgressBar,TransferSpeed,SelectedFilesCount,TimeElapsed"
                                Style="float: left;" />

 

<asp:Button ID="btnMultipleDocumentCancel" runat="server"
                        Text="Cancel" CausesValidation="false" />
                    <asp:Button ID="btnMultipleDocumentUpload" runat="server"
                        ClientIDMode="Static" Text="Upload" CausesValidation="false" Enabled="false" />​

</asp:Panel>

 

 

0
License
Top achievements
Rank 1
answered on 09 Nov 2015, 09:57 PM

This seems to be a similar issue...

 http://www.telerik.com/forums/args-progressdata-radupload-requestsize-is-not-reset

0
Peter Filipov
Telerik team
answered on 11 Nov 2015, 11:47 AM
Hi Robert,

I have setup a sample from your snippet and it seems that everything is working fine when the upload is canceled. Could you please send me a runnable page where I could observe the problem. I am sending you mine for a reference. 

Regards,
Peter Filipov
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
AsyncUpload
Asked by
License
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
License
Top achievements
Rank 1
Share this question
or