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

Access RadAsyncUpload in Gridview

2 Answers 94 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Ahmed
Top achievements
Rank 1
Ahmed asked on 31 Jul 2013, 02:37 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Valyavicharski
Telerik team
answered on 05 Aug 2013, 08:15 AM
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.
0
Ahmed
Top achievements
Rank 1
answered on 11 Aug 2013, 03:28 PM
Many thanks to you it's work 
Tags
AsyncUpload
Asked by
Ahmed
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Ahmed
Top achievements
Rank 1
Share this question
or