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

RAdToolTipManager And Ajax Update

2 Answers 104 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Sylvain Langlade
Top achievements
Rank 1
Sylvain Langlade asked on 06 Oct 2008, 09:03 AM
Hi,

I have a basic Problem.

On a RadGrid, i set up a GridTemplateColumn with an ImageButton Inside.

I want a click on my button display a RadTooltip permitting the user to edit a label.

I load a TextBox and a Button dynamically like this:

  protected void RadToolTipManagerComment_AjaxUpdate(object sender, ToolTipUpdateEventArgs e) 
  RadTextBox RTB_Comment = new RadTextBox(); 
  RTB_Comment.TextMode = InputMode.MultiLine; 
  RTB_Comment.ID = "RTBSAISIECOM"
  RTB_Comment.Width = 350
  RTB_Comment.EmptyMessage = "<Saisissez Votre Commentaire (optionnel)>"
 
 
   if (!e.Value.StartsWith("-1")) 
   { 
       RTB_Comment.Text = new SoinQuotidien(e.Value.Split('_')[0]).Commentaire; 
   } 
     
            
   e.UpdatePanel.ContentTemplateContainer.Controls.Add(RTB_Comment); 
 
 
   //Ajout du Bouton_Valider 
    
   Button Btn_ValiderComment = new Button(); 
   Btn_ValiderComment.ID = "Button_ValiderCom"
   Btn_ValiderComment.Text = "Valider"
   Btn_ValiderComment.CssClass = "button"
 
   Btn_ValiderComment.Click += new EventHandler(Btn_ValiderComment_Click); 
 
 
 
   e.UpdatePanel.ContentTemplateContainer.Controls.Add(RTB_Comment); 
   e.UpdatePanel.ContentTemplateContainer.Controls.Add(Btn_ValiderComment); 
 

Everything works fine first time i load the tootip, but after, every load of the tootlip is done with the data i loaded first time.

I think about an ajax render problem but i don't see my problem.

Thank you very much for your help.


2 Answers, 1 is accepted

Sort by
0
Sylvain Langlade
Top achievements
Rank 1
answered on 08 Oct 2008, 07:19 AM
I'm sorry, i transform that in support ticket because i really need an answer.
0
Svetlina Anati
Telerik team
answered on 08 Oct 2008, 10:47 AM
Hi Sylvain,

I already answered your support ticket and for your convenience I pasted my reply below:

The RadToolTipManager's OnAjaxUpdate event is fired early in the page's lifecycle due to many considerations. Therefore in order to get the desired behavior you should set the desired value to the RadTextBox later, e.g. in the RadTextBox's PreRender event.

I prepared a sample demo project which shows this approach and attached it to your support thread.
Kind regards,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ToolTip
Asked by
Sylvain Langlade
Top achievements
Rank 1
Answers by
Sylvain Langlade
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or