How To Upload Async upload Dynmically, when user Click's On Rad Grid Edit.

2 posts, 1 answers
  1. Sairam
    Sairam avatar
    56 posts
    Member since:
    May 2013

    Posted 24 May 2013 Link to this post

    I Have rad grid ,In that I have Rad Async upload ,when   user click On edit button of rad grid , i want to dynamically upload the file like ,when user select the click on async upload control ,that mean in rad grid ,I have some records,when user click on ,one record Edit Button
    at that time I want ,to Upload same picture to rad Async Upload ,Is any chance to that .

    I have idea,when user click on that edit button ,at the time ,we save already display  item in ,rad grid ,It stores ,In Some Download or Some temp folder,at same time ,we call async  upload file functionality Dynamically.upload file ,,

    can u plz help in that situation,where we store the file  ,how to dynamically load the file.sample snippet provided to me .

      1.    <telerik:GridTemplateColumn Visible="true" DataField="Signature" HeaderText="Signature"
      2.                     HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" UniqueName="Signature">
      3.                     <ItemTemplate>
      4.                         <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" DataValue='<%#Eval("Signature") is DBNull ? null : Eval("Signature")%>'
      5.                             AutoAdjustImageControlSize="false" ResizeMode="Fit" Height="50px" Width="120px" />
      6.                     </ItemTemplate>
      7.                     <InsertItemTemplate>
      8.                         <telerik:RadAsyncUpload runat="server" ID="ImgImages2" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
      9.                             MaxFileInputsCount="1" Skin="Outlook" Width="350px" PostbackTriggers="PerformInsertButton" />
      10.                         <asp:Label ID="lblupload2" runat="server" Visible="true" CssClass="error"></asp:Label>
      12.                     <EditItemTemplate>
      14.                         <telerik:RadAsyncUpload runat="server" ID="ImgImages" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
      15.                             MaxFileInputsCount="1" Skin="Outlook" Width="350px" PostbackTriggers="UpdateButton" />
      17.                         <asp:Label ID="lblupload1" runat="server" Visible="true" CssClass="error"></asp:Label>--%>
      18.                     </EditItemTemplate>
      19.                 </telerik:GridTemplateColumn>


  2. Answer
    Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 29 May 2013 Link to this post

    Hi Sairam,

    This scenario is not supported. For security reasons it is not allowed to dynamically load file in RadAsyncUpload control. I suggest to change your logic. For example you could add/copy the same file for every record of the grid, without interaction with the upload control.

    Hristo Valyavicharski
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top