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

Change of tooltip text on AJAX postback

4 Answers 110 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 29 Apr 2009, 10:49 PM
Hi,

I want to arrange for the content of a Rad ToolTip (or manager) to change after an AJAX postback from a RAD Combo.

To expand my scenario more completely:

I have implemented several RadCombos each with the templated checkbox items (as per your other demos) so that the user can select a combination of items by checking the boxes in the drop down. Now in your demos, you show how to update the "text" of the Combo to list out which items have been selected, however this rapidly becomes hopeless since there is not enough space to show them all in the text area.

So I have modified the js that fires when the checkboxes are checked and unchecked so that if none (or all) are selected the "empty message" is displayed (this says All xxxxx), if exactly one check box is selected the text box displays the text of the selected item, and if more than one is selected the words "Multiple Items" are displayed.

Of course what i now want to acheive is that a tool tip is available to display the full list of selected items when more than one has been selected.

I have attached a RadToolTip (have tried both manager or individual radtooltips) to the Combos, and set the initial ToolTip Text declaratively.

When the RadCombo drop down closes an AJAX postback takes place (using AJAX Manager) - I have to do this since I need to trigger a rebind of a grid to reflect the changed selections, at the same time, I update the "tooltip" of each combo, hoping that when it is all finished the user can hover on the combo and see the updated text. But nothing changes.

If I don't use AJAX, then the tooltip does update to reflect the new list of selected items. I have tried linking the combo and the tooltip manager in the AJAX manager but that does not seem to cause the ToolTip Manager to re-read the tooltiptext of the combos.

I presume I could also do this with js client side, in which case I am again having problems updating the tooltip of the combo and having that relflect in the tooltip (manager) that appears, and since I have to postback to the server to get a different record list, it seems sensible to use the same code to set the new tooltip.

4 Answers, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 29 Apr 2009, 11:07 PM
I think I need to expand on the above.

When the drop down closes, a hidden "helper" button control is clicked to trigger the AJAX postback (alos as per an article I found somwhere on the site). So in fact the combos are not triggering the AJAX at all.

Having added the Helper button to AJAX manager, I am starting to get some effects, but at the moment not qute what i need - all the combos end up with the same new text.
0
Accepted
Svetlina Anati
Telerik team
answered on 30 Apr 2009, 09:57 AM
Hi Andrew,

I am afraid your scenario is pretty complex and I am not able to completely understand it and also assume the configurations you have used. That is why I suggest to open a new support ticket and send me a sample reproduction demo which can be run without any modifications along with very detailed reproduction steps and explanations of the actual and the desired behavior. Once I have the setup and your exact requirements, I will do my best to help.

Regards,
Svetlina
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
Andrew
Top achievements
Rank 1
answered on 30 Apr 2009, 11:07 AM
Hi Svetlina

I thinkI have managed to find the solution now.

It is tied up with having to put the right links in the AJAX manager. In my case, I needed a post back (AJAX) to occur when the drop down of a RadCombo closed. To do this I followed the advice found in another thread and set a client JS function, attached to the "OnDropDownClosed" event of the combo, which clicked a "hidden" button which in turn initiated the postback to the server.

To get the Combo updated as part of the AJAX processing, the button must be linked to the combo in the AJAX Manager, since it was the button that was triggering the postback, not the combo.

Andrew


0
Svetlina Anati
Telerik team
answered on 30 Apr 2009, 02:03 PM
Hi Andrew,

I am glad you were able to find a solution. In case you encounter problems, do not hesitate to contact us again.

Greetings,
Svetlina
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.
Tags
ToolTip
Asked by
Andrew
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or