RadAsync Upload Control firing client event from RADGrid.

2 posts, 0 answers
  1. Chirag.Amin
    Chirag.Amin avatar
    1 posts
    Member since:
    Oct 2011

    Posted 29 Jul 2013 Link to this post

    Hi, I am having problem with firing client side ajax for radAsyncControl within RadGrid.(WithGrid.aspx)  I have RadGrid on page and I have radAsyncControl as part of each row on Grid upload. When I select file and fire client side event "OnClientFilesUploaded", I want to fire a Ajax event that will perform task on server side.

    If I don't use radgrid and put control on directly on page then this event works fine (WithoutGrid.aspx)

    Please find code per page as belows
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            <script type="text/javascript">
                function OnClientFilesUploaded(sender, args) {
                    $find('<%=RadAjaxManager1.ClientID %>').ajaxRequest();
        <form id="form1" runat="server">
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
                        <td style="width: 100%">
                            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="false">
                                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                                            <telerik:AjaxUpdatedControl ControlID="dgChartList" />
                            <telerik:RadGrid ID="dgChartList" runat="server" AutoGenerateColumns="False"
                                Skin="Vista" AllowSorting="True" AllowPaging="True" PageSize="5" GridLines="Horizontal" BorderColor="#999999" BorderStyle="Solid" CellSpacing="0" >
                                <ClientSettings EnableRowHoverStyle="true">
                                    <Selecting AllowRowSelect="true"></Selecting>
                                    <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="Top" />
                                        <telerik:GridBoundColumn DataField="ScheduleDate" HeaderText="Due Date" ItemStyle-Width="80">
                                            <HeaderStyle Font-Bold="True" />
                                        <telerik:GridTemplateColumn HeaderText="Chart Location">
                                                <telerik:RadAsyncUpload ID="AsyncUpload1" Width="100px" runat="server" TemporaryFolder="Files" PostbackTriggers="btnSave"
                                                    OnFileUploaded="AsyncUpload1_FileUploaded" Style="float: left;"
                                                    <Localization Select="Browse" />
                                            <HeaderStyle Font-Bold="True" />
                                <PagerStyle Mode="NumericPages"></PagerStyle>
                                <GroupHeaderItemStyle CssClass="Grid_Header" Height="20px" HorizontalAlign="Left"
                                    VerticalAlign="Middle" />
                                <ClientSettings AllowDragToGroup="true" />
    protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            dgChartList.DataSource = BindGrid();
    private DataTable BindGrid()
        DataTable dataTable = new DataTable();
        dataTable.Columns.Add("ScheduleDate", typeof(string));
        dataTable.Rows.Add(new object[] { "05/03/1986" });
        dataTable.Rows.Add(new object[] {  "12/12/1966"});
        dataTable.Rows.Add(new object[] { "15/06/1956" });
        dataTable.Rows.Add(new object[] {  "01/04/1979" });
        return dataTable;
    public void AsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
        string test = "event Called";
        string strFileName = e.File.FileName;
  2. Plamen
    Plamen avatar
    3080 posts

    Posted 01 Aug 2013 Link to this post


    I have tested the issue and it worked as expected when I added the onAjaxRequest event in the code behind of the page. Here is a video of my test. 

    Hope this will be helpful.

    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.
Back to Top