editing with a RADWindow

2 posts, 0 answers
  1. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 17 Mar 2009 Link to this post

    Im trying to implement an insert/edit fucnction utilising a RADWindow.  The example provided
    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx

    uses a RadAjaxManager and then the following code

    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
            {
                if (e.Argument == "Rebind")
                {
                    RadGrid1.MasterTableView.SortExpressions.Clear();
                    RadGrid1.MasterTableView.GroupByExpressions.Clear();
                    RadGrid1.Rebind();
                }
                else if (e.Argument == "RebindAndNavigate")
                {
                    RadGrid1.MasterTableView.SortExpressions.Clear();
                    RadGrid1.MasterTableView.GroupByExpressions.Clear();
                    RadGrid1.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount - 1;
                    RadGrid1.Rebind();
                }
            }


    However, Im using a master page that contians the RADAJAX manager so I have a 

    RadAjaxManagerProxy on the child form.  This has no associated AJAXRequest event so how do I get around this ?

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3706 posts

    Posted 20 Mar 2009 Link to this post

    Hello Mark,

    To attain the functionality you are searching for you need to wire the code for the RadAjaxManager's AjaxRequest event. Then on the client-side you just need to call ajaxRequest() method of the RadAjaxManger. Here is a code snippet showing how to achieve this:
    protected void Page_Load(object sender, EventArgs e) 
        { 
            RadAjaxManager manager = RadAjaxManager.GetCurrent(Page); 
            manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager_AjaxRequest); 
        } 
     
        protected void manager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) 
        { 
            //handle the manager AjaxRequest event here 
        } 
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
     
            <script type="text/javascript"
                function myUserControlClickHandler() 
                {
                    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("content"); 
                } 
            </script> 
     
        </telerik:RadCodeBlock> 

    For further information please review this online help topic devoted on this matter.

    Sincerely yours,
    Georgi Krustev
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top