CodeCharge Studio

Use the Before Show Event to Alter Text Color

The first task in the series of enhancements will be to alter the color of a grid field on our Task List page. To be more specific, we will mark the listed tasks assigned to the currently logged in user by showing them in blue text.

  1. Open the tasks_list page in the Project Explorer.
  2. Expand the tasks grid.
  3. In the Project Explorer right-click on the task_name field and select Properties.
  4. Under the Data tab, set the value of the Content property to HTML.
  5. Select task_name label in the Project Explorer.
  6. Select the Events tab in the Properties window.
  7. Right-click on the Before Show event and select Add Code... .

    The Before Show event occurs in the program after the field values are assigned, but before being output as HTML. By adding code into this event, you can modify the field value before it is shown.

Next: Programmatically Control Field's Value


On-line, printable versions and updates