# Highlight Related Data

## Content

You can change the list's display to highlight rows by creating row styles. This enables you to draw user's attention to specific data in the list.

In the following image, the list items for which the value of "Discontinued" field is "0" have been highlighted in the List control.

![Highlight related data](https://cdn.mescius.io/document-site-files/images/1e4aa2c8-7f81-4e43-8ed4-f673f1e68381/images/highlightdata.png)

To highlight data in the List, you can set [FetchRowStyles](/componentone/api/win/online-list/dotnet-api/C1.Win.List.10/C1.Win.List.ListBase.C1ListBase.FetchRowStyles.html) property of the <span data-popup-content="This class is available in \u003ca href=\u0022/componentone/docs/win/online-list/\u0022\u003e.NET\u003c/a\u003e and \u003ca href=\u0022/componentone/docs/win/online-list/\u0022\u003e.NET Framework\u003c/a\u003e." data-popup-title="C1List" data-popup-theme="ui-tooltip-green qtip-green">C1List</span> class to **true**. This property fires the **FetchRowStyle** event whenever the list is about to display a row of data.

The following example demonstrates how to create style characteristics and apply them to rows dynamically using the FetchRowStyle event.

1. Set the **FetchRowStyles** property to true and subscribe to the FetchCellStyle event.

    ```csharp
    //set FetchRowStyles to true
    c1List1.FetchRowStyles = true;
    //hanlde FetchRowStyle event
    c1List1.FetchRowStyle += C1List1_FetchRowStyle;
    ```
2. Add the following code to the **C1List1\_FetchRowStyle** event handler to highlight data based on specific conditions.

    ```csharp
    private void C1List1_FetchRowStyle(object sender, C1.Win.List.FetchRowStyleEventArgs e)
    {
        //check if the item is discontinued
        var discontinued = int.Parse(c1List1.Columns["Discontinued"].CellText(e.Row));
        if (discontinued != 0)
            //highlight if not discontinued
            e.CellStyle.ForeColor = Color.Blue;
    }
    ```