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

RadTooltipManager with postback loosing viewstate

2 Answers 165 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Andres
Top achievements
Rank 1
Andres asked on 01 Jul 2008, 03:55 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 02 Jul 2008, 04:04 PM
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
0
Andres
Top achievements
Rank 1
answered on 02 Jul 2008, 06:56 PM
damn that i didn't think about that :)  

thx a lot!!
Tags
ToolTip
Asked by
Andres
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Andres
Top achievements
Rank 1
Share this question
or