Access RadAsyncUpload in Gridview

3 posts, 1 answers
  1. Ahmed
    Ahmed avatar
    3 posts
    Member since:
    Jul 2013

    Posted 31 Jul 2013 Link to this post

    hi....
    what i want simply i have two template fields in a gridview
    one for   RadAsyncUpload  and other for a button 
    what i want that i want to get RadAsyncUpload  that found in the same GridViewRow of the clicked button using jquery 

    i tried something like this 
       var uploader = $(this).closest('td').prev().find(".MyClass");
    but i doesn't get the control


  2. Answer
    Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 05 Aug 2013 Link to this post

    Hi Ahmed,

    Here is how it can be done by using jQuery:
    <asp:GridView ID="GridView1" runat="server">
                 <Columns>
                     <asp:TemplateField>
                         <ItemTemplate>
                             <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server"></telerik:RadAsyncUpload>
                         </ItemTemplate>
                     </asp:TemplateField>
                     <asp:TemplateField>
                         <ItemTemplate>
                             <input id="inputUpload" type="button" value="Upload" class="inputUpload" />
                         </ItemTemplate>
                     </asp:TemplateField>
                 </Columns>
             </asp:GridView>

    <script type="text/javascript">
        function pageLoad() {
            $('.inputUpload').click(function () {
                var row = $(this).parent('td').parent('tr');
                var upload = $find(row.find('.RadAsyncUpload').attr('id'));
            });
        }
    </script>

    Regards,
    Hristo Valyavicharski
    Telerik
    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 the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ahmed
    Ahmed avatar
    3 posts
    Member since:
    Jul 2013

    Posted 11 Aug 2013 Link to this post

    Many thanks to you it's work 
Back to Top