New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Export from Tooltip

HOW TO

Export or send a file from a tooltip.

The sample below applies when content is loaded on demand through the AjaxRequest event of a tooltip manager. There are a few other alternatives that you may find useful as well.

DESCRIPTION

The tooltip manager only recreates its controls during a partial postback, because this is when they will be shown by it. A full postback means the page is being refreshed and no tooltip will be shown, so loading content for it is not needed. An export operation (sending a file) requires a full postback, however.

SOLUTIONS

There are several approaches you can take:

  • If you have content large enough to require complex export, you may want to show such details in a RadWindow. You can find a similar example in the Window - Edit Dialog for RadGrid live demo.
  • If you do not have many targets with varying content but still want the tooltip appearance, you can use a standalone tooltip without an UpdatePanel inside. This will have the content load on the initial page load as it is part of its markup.
  • If you will be exporting the contents to a PDF, you can do that on the client, see the ClientExportManager - Export HTML Elements live demo.
  • Raise a ViewState flag that a tooltip is opened that holds its Value. Use it to re-create its contents when a button is clicked. Make sure the button is added as a postback control. You can find an example of this below.

Project files

You can download the sample project files from here.

SEE ALSO

Here are some relevant resources that showcase how the tooltip manager works and how to load data in it on demand, and how to troubleshoot some common issues you may encounter:

In this article
Not finding the help you need? Improve this article