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

Upload and Progress problems

3 Answers 180 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Aytaç Utku TOPAL
Top achievements
Rank 2
Aytaç Utku TOPAL asked on 14 Mar 2009, 08:28 AM
Hello,
I am trying to use a radupload with radprogressmanager and radprogressarea in a radtabstrip control which have also radajaxpanel. I read and tried lots of topic in this subject but I couldn't find any solution to my problems. Let me explain. 
Yesterday, my uploads  were working, but I wasn't able to see progressarea. But today radupload have nor uploadedfiles neither invalidfiles. Yesterday my code was in an other radajaxpanel which have  some codes that I copied from other posts on ClientEvents-OnRequestStart event. And today my codes are below.
 <asp:Panel runat="server" ID="pnlAttachments" Visible="false">  
                                <telerik:RadUpload ID="RadUpload1" runat="server" InitialFileInputsCount="1" MaxFileInputsCount="5" 
                                    AllowedFileExtensions=".pdf,.xls,.doc,.docx,.xlsx" ControlObjectsVisibility="RemoveButtons,AddButton">  
                                </telerik:RadUpload> 
                                <telerik:RadProgressArea ID="progressArea1" runat="server" /> 
                                <asp:Button ID="btnAttachmentCancel" runat="server" Text="Cancel" Style="margin-top: 6px" /> 
                                <asp:Button ID="buttonSubmit" runat="server" Text="Submit" Style="margin-top: 6px" /> 
                            </asp:Panel> 
And I just found another javascript function that I use yesterday. I hope it will help you to understand what is wrong with my code. Codes are below:
   function conditionalPostback(sender, args)  
            {  
                if (args.EventTarget == "<%= ButtonSubmit.UniqueID %>")  
                {  
                    args.EnableAjax = false;  
                }  
            } 

I guess I am  a little confused after reading so much post and everytime found another possible errors.
I would appreciate it a lot, if you could help me to work that uploads.
Kind regards,
AytaƧ Utku TOPAL

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 16 Mar 2009, 12:28 PM
Hello AytaƧ Utku TOPAL,

That function - conditionalPostback should be attached to the ClientEvents-OnRequestStarted event of the RadAjaxPanel. I have reviewd your code and everything seems tobe OK with it. For your convenience I have created sample project reproducing your scenario - RadUpload inside RadTabStrib that is nested inside RadAjaxPanel. You can find it as at attachment.

Greetings,
Genady Sergeev
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Aytaç Utku TOPAL
Top achievements
Rank 2
answered on 16 Mar 2009, 01:12 PM
Hi again,
Thank a lot for your solutuon. It was not actually same scenario as mine but even I modified your sample project it is also worked correctly. But I still have some problems with upload. I can upload files but I still can't see progressarea. I thought It was because I have another radajaxpanel that have no onclient-requeststarted event in masterpage. But I modified your exapmle and it  seems it is not the reason of it. I also noticed that you didn't use your code in radcodeblock (I mean javascript that disables uploadbuttons ajaxenable property). But it is also not the reason of it. Maybe I filtered uploads to .doc files so I cant try any bigger file that I will be able to notice progressarea. But I still have some problems. After using radupload for once, some controls have problems with skin. I tried enableajaxskinrendering=true (it was something like that) but there is still something wrong. Why do you think it is getting like this? 
Here are my codes in pageview.
  <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" ClientEvents-OnRequestStart="conditionalPostback">  
                    <table> 
                        <tr> 
                            <td align="left">  
                                <center> 
                                    <asp:Panel runat="server" ID="pnlViewAttachments">  
                                        <telerik:RadGrid ID="grdAttachments" runat="server" GridLines="None" PageSize="6" 
                                            EnableAjaxSkinRendering="true" ShowHeader="false" Width="760px">  
                                            <MasterTableView TableLayout="Fixed">  
                                                <ItemTemplate> 
                                                    <%--                   <%#If((DirectCast(Container, GridItem).ItemIndex <> 0), "</td></tr></table>", "")%>--%> 
                                                    <asp:Panel ID="ItemContainer" CssClass='<%# If((DirectCast(Container, GridItem).ItemType = GridItemType.Item), "item", "alternatingItem") %>' 
                                                        runat="server">  
                                                        <table> 
                                                            <tr> 
                                                                <td> 
                                                                    <img src='<%#"images/Extensions/"& Eval("Extension").ToString().ToLower() & ".png"%>' 
                                                                        alt='<%# Eval("Extension")%>' height="48px" width="48px" /> 
                                                                </td> 
                                                                <td> 
                                                                    <b>File Name:</b><%#Eval("FileName")%> 
                                                    </asp:Panel> 
                                                    </td> </tr> </table> 
                                                </ItemTemplate> 
                                            </MasterTableView> 
                                        </telerik:RadGrid> 
                                    </asp:Panel> 
                                </center> 
                                <asp:Panel runat="server" ID="pnlAttachments" Visible="false">  
                                    <telerik:RadUpload ID="RadUpload1" runat="server" InitialFileInputsCount="1" MaxFileInputsCount="5" 
                                        EnableAjaxSkinRendering="true" AllowedFileExtensions=".pdf,.xls,.doc,.docx,.xlsx" 
                                        ControlObjectsVisibility="RemoveButtons,AddButton">  
                                    </telerik:RadUpload> 
                                    <telerik:RadProgressArea ID="progressArea1" runat="server" /> 
                                    <asp:Button ID="btnAttachmentCancel" runat="server" Text="Cancel" Style="margin-top: 6px" /> 
                                    <asp:Button ID="buttonSubmit" runat="server" Text="Submit" Style="margin-top: 6px" /> 
                                </asp:Panel> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td align="left">  
                                <asp:Panel runat="server" ID="pnlAttachmentButtons">  
                                    <asp:Button ID="btnAttachment_New" runat="server" Text="New" />&nbsp; &nbsp; &nbsp;  
                                    <asp:Button ID="btnAttachment_Open" runat="server" Text="Open" />&nbsp; &nbsp; &nbsp;  
                                    <asp:Button ID="btnAttachment_SaveAs" runat="server" Text="Save As" />&nbsp; &nbsp;  
                                    &nbsp;  
                                    <asp:Button ID="btnAttachment_Delete" runat="server" Text="Delete" /> 
                                </asp:Panel> 
                            </td> 
                        </tr> 
                    </table> 
                </telerik:RadAjaxPanel> 
Actualy, in sample project, page gets refreshed then radprogressarea appears. But in my project I see ajaxloadingpanel animation instead.
Kind Regars
AytaƧ Utku TOPAL
0
Genady Sergeev
Telerik team
answered on 16 Mar 2009, 04:02 PM
Hello AytaƧ Utku TOPAL,

It is highly unlike to see the progress area if you are uploading small files (like docs). They are uploaded faster than it takes the ProgressArea to appear. I have reviewed your sample, it seems OK but - your grid is not bound to anything. This way he won't appear on the page. In the code library there is a sample project that is close to your scenario. You can find it here. There is also online demo that follows relative scenario - you can find it here.

I hope this information helps.

Kind regards,
Genady Sergeev
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Upload (Obsolete)
Asked by
Aytaç Utku TOPAL
Top achievements
Rank 2
Answers by
Genady Sergeev
Telerik team
Aytaç Utku TOPAL
Top achievements
Rank 2
Share this question
or