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

Ajaxification not working in content page.

1 Answer 55 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 19 Sep 2011, 02:53 PM
Hi,

I'm using a rad grid to show line items for an invoice. Each row has an image button column used to delete the row when clicked.
I prefer to do this on the client and everything works fine until I call rebind to update the grid. It just doesn't work.The results in my data store show's the row has been deleted but the page is still posted back. Am I doing something wrong? Is there something else I should do since I'm using master pages?
function DeleteRow() {
             EstimateWebService.DeleteEstimateItems(rowId.Id, OnDeleteRowSucess)
         }
function OnDeleteRowSucess() {
             $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
         }
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                    EnableViewState="false" onajaxrequest="RadAjaxManager1_AjaxRequest">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="btnAddNewRow">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="grdEstimateItems" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grdEstimateItems" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                  <telerik:AjaxSetting AjaxControlID="grdEstimateItems">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grdEstimateItems" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                </AjaxSettings>
           </telerik:RadAjaxManager>
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
    if (e.Argument == "Rebind")
    {
        //RadGrid1.MasterTableView.SortExpressions.Clear();
        //RadGrid1.MasterTableView.GroupByExpressions.Clear();
        grdEstimateItems.Rebind();
    }
}

Thanks,
Ron.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Sep 2011, 04:54 AM
Hello Ron,

In a complex scenario like WebUserControls or Master/ContentPages, one should place RadAjaxManager instance on the main/master page and add a proxy control to the user control/content page.
The following help article explains more on this.
RadAjaxManagerProxy.

Thanks,
Princy.
Tags
Ajax
Asked by
Ron
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or