This project is read-only.

Display Attribute Description used as Tooltip

Nov 14, 2012 at 8:09 AM


As we are already using various display attributes for the controls would it be possible to use the Description attribute as a Tooltip for various controls

Many thanks


Nov 15, 2012 at 12:11 PM

You can do it by defining some Mvc Templates as explained in this series of post of Brad Wilson. So for instance if you want to use the tooltip in all TypedTextBox of a grid, you define a template based on the TypedTextBox, and use it in the grid instead of the simple TypedTextBox. In your template you read the description metadata and put it in the TypedTextBox as a tooltit by using its htmlAttributes parameter. The you can also use jQuery tooltips plugin to have a better user experience.