Page refresh issue on RADwindow OnClientClose

3 posts, 0 answers
  1. Zinith Patel
    Zinith Patel avatar
    4 posts
    Member since:
    Jan 2010

    Posted 09 Feb 2010 Link to this post

    Hello,

    I have one page e.g. New Item Create Page. on which there is combo for Category and next to it button to add new category. on clicking on button RAD window is opened as modal window for adding new category. But when I close this modal window the main page refreshes which whole page and clears the values in the controls.
    I need to keep this controls to keep their values.
    So, I want such help like onClientClose of the modal window only combobox gets refreshed.


    Thanks in Advance.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 10 Feb 2010 Link to this post

    Hello Zinith Patel,

    You can invoke an ajaxRequest on closing the modal radwindow in the OnClientClose event. And then popupale the RadComboBox in the AjaxManager AjaxRequest server side event.

    Client side:
     
        function OnClientClose(sender, args) { 
             var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); 
             ajaxManager.ajaxRequest('RefreshCombo'); 
        } 

    Code behind:
     
        protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) 
        { 
            if (e.Argument.ToString() == "RefreshCombo"
            { 
                // Here write code for refreshing the RadComboBox1
            } 
        } 

    Also set the AjaxSettings as shown below:
     
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">  
        <AjaxSettings>  
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="RadComboBox1" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
        </AjaxSettings>  
    </telerik:RadAjaxManager>  

    -Shinu.
  3. Zinith Patel
    Zinith Patel avatar
    4 posts
    Member since:
    Jan 2010

    Posted 10 Feb 2010 Link to this post

    Hello Shinu,
    Thanks  for your reply. Your suggestion worked perfectly. But after implementing this way normal events of the Rad combobox (like selectedindexchanged) has stopped working. can you help resolving this?


    Again Thanks in advance.
Back to Top