I have the following scenario:
- The user goes to a page and uploads a document using RadUpload control
- Saves the current work (on the same page there are some other controls) and close the page– we get kind of URI for the uploaded file and store it.
- The user opens the page again, we should indicate somehow that the file is already uploaded, that’s why we developed small UserControl which we put on top of the RadUpload and disable the RadUpload as well.
- The user can close this little control and re-enable the RadUpload to upload a new document (this means that the first one is uploaded by mistake or for some reasons the user should upload a new one and remove the old document).
To have consistent UI we want to replace the default RadUpload appearance when
a document is uploaded, but we don’t want to rewrite the entire Item template
because we are happy with the default one when we upload a document. That’s why
we developed small user control with a text “the document is already, click here
to open it” and remove button (x). When the removed button is pressed we just
hide this control and re-enable the RadUpload. My Idea was that I’ll show it when
the ppload is completed and it does work but below still is the default UI with
the uploaded file and the progress. I invoked the CancelUpload() method which
cleared the Items but the progress bar didn’t disappear. See the file attached.
I need exactly the same behavior that does the CancelButton – it clears the items
and removes the progress bar. I used the reflector to see the code and found the
property: private RadUploadState State. but I didn't find a way to set it.
How I can re-init the control state?
Best Regards
Kaloyan Nikolov