RadTooltipManager with postback loosing viewstate

3 posts, 1 answers
  1. Andres
    Andres avatar
    16 posts
    Member since:
    Jan 2008

    Posted 01 Jul 2008 Link to this post

    Hi

    We're having a very weird problem that we need to have solved as soon as possible.

    We are using the radTooltipManager together with the radTreeview.  This works very good, the tooltip shows correctly and the onajaxload event is fired and we can load the correct detailed information.

    Now, in the tooltip some textfields are filled with dynamic bound information.  When we change the content of the fields and force a postback, the viewstate of those fields is lost.

    We searched everywhere but can't find the source of the problem. 

    Here are some code snippets:

    The radTooltipManager
     <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" EnableViewState="true" ShowEvent="FromCode" Modal="true" Width="350" Height="700" AutoTooltipify="false" Position="TopCenter" RelativeTo="BrowserWindow" ManualClose="true" Animation="None" Sticky="true"></telerik:RadToolTipManager> 
            

    The ajaxUpdate event
     
        Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As ObjectByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) 
            Dim ctrl As blah = Page.LoadControl("~/blah.ascx"
            ctrl.ID = "blah" & e.Value 
            ctrl.EnableViewState = True 
            ctrl.Task_Id = e.Value 
            ctrl.bindData() 
            e.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl) 
        End Sub 


    In the usercontrol there are just some textfields that are filled and a save button.   when we hit the save button, the fields are refilled with the original data and not the new data. 

    If we don't rebind the data when we hit the save button, the fields stay totally empty!

    Any ideas Telerik Team?

    Thx

    A.
  2. Answer
    Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 02 Jul 2008 Link to this post

    Hello Andres,

    Since I do not have your code I can only assume what could be the reason for the problem.

    I suppose that the problem comes from the fact that you set the values for the TextBox in the user control's Page_Load handler. However, in this case, you will have to do it at a later stage in the page lifecycle - for example, in the OnPreRender handler:

    protected void Page_Load(object sender, EventArgs e)  
    {  
        //this.ShowCurrentDetails();  
    }  
     
    protected override void OnPreRender(EventArgs e)  
    {  
        base.OnPreRender(e);  
        this.ShowCurrentDetails();  

    In case this does not help, please open a new support ticket and send me a sample, fully runnable project (including DB, if needed) and I will do my best to help.


    Sincerely yours,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Andres
    Andres avatar
    16 posts
    Member since:
    Jan 2008

    Posted 02 Jul 2008 Link to this post

    damn that i didn't think about that :)  

    thx a lot!!
Back to Top