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

Problem with refreshing controls

4 Answers 179 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Farouk
Top achievements
Rank 1
Farouk asked on 12 Mar 2009, 10:42 AM
hi,

i have a problem in my scenario: when i call a radwindow, after closing this and handling the closing event in javascript, i call a a ajax request from the RadAjaxManager:

function OnClientClose() { 
    // After Closing the dialog: AjaxRequest 
    $find("<%= manager.ClientID %>").ajaxRequest("ClientClose");
}

then codebehind:
protected void manager_AjaxRequest(object sender, AjaxRequestEventArgs e) 
    switch (e.Argument) 
    { 
        case ""
            //refill combobox, enable button,... 
        break
    } 

so when i watch the control propertys(from combobox) in codebehind, everything is allright but in the browser nothing is updated...

when i call the RadAjaxPanel.RaisePostBackEvent(""); from the RadAjaxPanel that encloses all controls, the controls are updated in the browser, showing new entrys and activation status but i can't open the combobox or in an other scenario i can't click the treeview nodes...

so my question is, why are the controls in the browser in a status like freezing, when i call the RaisePostBackEvent method

or

is there an other way to update controls like combobox or treeview like the rebind of the datagrid???

sorry for my english..

4 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 13 Mar 2009, 03:55 PM
Hi Bastian,

Please check out if you have added ajax setting where the RadAjaxManager updated the controls you change in the manager AjaxRequest event handler.
Additionally, make sure you are not updating same page content with RadAjaxPanel and RadAjaxManager same time.

I hope this helps.

Kind regards,
Iana
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.
0
Farouk
Top achievements
Rank 1
answered on 16 Mar 2009, 09:39 AM
hi Iana,

ok thx for the advice with the double RaisePostBackEvent calling, after i call the ajaxrequest in js from the panel, not from the manager, all works fine...

now i have an other problem, with ajax ;)...

i try to update a ajax-panel that is contained in the master page and encloses a treeview. ok, i set the ajaxrequest of the panel, for every contantpage in the page load event, like here:

protected void Page_Load(object sender, EventArgs e) 
  if (!this.IsPostBack) 
  {     
     //the event handling 
     ((Telerik.Web.UI.RadAjaxPanel)this.Page.Master.FindControl("treeViewPanel")).AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(ContentPage_AjaxRequest); 
  } 
 
//and the necessary method 
public void EmailFolder_AjaxRequest(object sender, AjaxRequestEventArgs e) 


but when i call the ajaxrequest in javascript,
window.ctl00_treeViewPanel.ajaxRequest("ClientClose"); 
//no error appears 
 

the programm don't come to the event-handling method... ahm i mean the EmailFolder_AjaxRequest method would not be called... (omg, my bad english ;) )..

is that a problem with the interaction of the masterpage, or what could be the problem??






0
Accepted
Iana Tsolova
Telerik team
answered on 18 Mar 2009, 03:39 PM
Hello Bastian,

Try removing the if(!IsPostBack) clause and see if it makes any difference:

protected void Page_Load(object sender, EventArgs e)    
{    
  ((Telerik.Web.UI.RadAjaxPanel)this.Page.Master.FindControl("treeViewPanel")).AjaxRequest +=   
  new RadAjaxControl.AjaxRequestDelegate(ContentPage_AjaxRequest);    
}    
 


Best wishes,
Iana
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.
0
Farouk
Top achievements
Rank 1
answered on 19 Mar 2009, 09:07 AM
it was so simply but stupid from me,

many thanks!!
Tags
Ajax
Asked by
Farouk
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Farouk
Top achievements
Rank 1
Share this question
or