I have a tricky question and hope I can explain it well.
Here is my question: I have a radgrid FormTemplate for Adding/Editing rows in which I have used RadAsyncUpload control for uploading files. The file is being uploaded successfully on insert and update. In addition, I have a link button configured in my radgrid view to download the files whenever needed.
The problem is now here: When trying to download the from radgrid view right after uploading the file, I cannot download it. Instead I need to first reload the page and then I can download the file. What could be the problem? I also used grid.rebind() method but this doesn't work. Below is a brief area of my code:
<Columns>
<telerik:GridButtonColumn Text="Download" HeaderText="Responsible" ItemStyle-ForeColor="Blue" CommandName="DownloadResponsibleAttachment" ColumnGroupName="Attachments"
ConfirmTextFields="ResponsibleAttachment" ConfirmTextFormatString="Would you like to download attachment?" HeaderStyle-Width="30px"
ConfirmDialogType="RadWindow" Reorderable="false" UniqueName="DownloadResponsibleAttachment" ConfirmTitle="File Download">
</telerik:GridButtonColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<p class="lbl" style="font: 10px verdana, arial; color: #166c92; font-weight: bold;">Responsible Attachment</p>
<telerik:RadAsyncUpload ID="attResponsible" runat="server" InitialFileInputsCount="1" MaxFileInputsCount="1" MaxFileSize="1048576"
TargetFolder="~/Attachments" TemporaryFolder="~/Attachments" TemporaryFileExpiration="600000" ControlObjectsVisibility="None"
OverwriteExistingFiles="true" ToolTip="You can only upload one file with maximum 1 MB." OnFileUploaded="attResponsible_FileUploaded" >
</telerik:RadAsyncUpload>
<div style="float:right; padding-top:20px;">
<asp:Button ID="btnUpdate" CssClass="btn" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>
<asp:Button ID="btnCancel" CssClass="btn" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>
</FormTemplate>
</EditFormSettings>
Just for record purpose, I want to post this answer for the problem I had. I found a way to resolved this issue. It seemed that there was a problem with RadAjaxManager so I replaced it with RadAjaxPanel which worked perfect for me.