This sample demonstrates how the FormatField event can be used to change the way fields are displayed in the grid and in the edit controls. It also demonstrates how a field (BirthDate) can be validated using a custom validation check and how custom error messages can be displayed using the Error event.
In the grid below, the Notes field is formatted so that only the first 10 words are displayed, and a tooltip appears when the user hovers the mouse over the field. This is implemented by generating a <span>-tag with an appropriate title attribute in the FormatField event handler (see the source code).
In edit mode, the Birthday field is formatted differently from the default formatting that is specified in the XML configuration file. In edit mode, the day of the week is removed, so that the value entered by the user is parseable.