Back to Devexpress

How to Set Hint Content

aspnetmvc-119701-components-docking-and-popups-hint-how-to-set-hint-content.md

latest3.1 KB
Original Source

How to Set Hint Content

  • May 24, 2023
  • 4 minutes to read

The DevExpress Hint consists of the Title and Content elements.

Use one of the following approaches to set a Hint’s content and title:

Using the Content, ContentAttribute, Title, TitleAttribute properties.

A Hint allows you to specify its content and title text in two ways:

Using the Show() method

The ASPxClientHint.Show method invokes a hint. It also obtains the content and title arguments that can be specified in the following ways. Note that the title argument is optional.

  • Pass the HTML-based hint’s content and title directly as the Show method’s arguments.

  • Specify the target element’s attributes from which a hint obtains its content and title.

  • Specify the HTML-based hint’s content and title dynamically using the onShowing function. The onShowing function can be used either as the Show method’s second argument or as a part of the method’s options argument (ASPxClientHintOptions).

Using the Register() method

The ASPxClientHint.Register method registers a hint’s functionality with the specified settings. It also obtains the content and title arguments that can be specified in the following ways. Note that the title argument is optional.

  • Pass the HTML-based hint’s content and title directly as the method’s arguments.

  • Specify the target element’s attributes from which a hint obtains its content and title.

  • Specify the hint’s content and title dynamically using the method’s ASPxClientHintOptions.onShowing function. The onShowing function can be utilized either as the Register method’s second argument or as a part of the options argument (ASPxClientHintOptions).

See Also

Online Demo: MVCxHint - Load Content on Demand

Where To Locate a Hint

When To Show a Hint