# Managing Reference Data
URL: https://pro.rv-grid.com/guides/faq/data-reference/
Source: src/content/docs/guides/faq/data-reference.mdx
Reference data represents static data in a key/value pair format.
This type of data typically remains constant between server requests, making it ideal for scenarios where meaningful labels need to be displayed alongside coded values. For example, a car make might be represented as `'aud': 'Audi'`.

Reference data mapping is a Core RevoGrid pattern. It uses column value handlers such as `cellParser` and does not require Pro plugins.

{/*
### Example Data Structure

The data returned from the server usually consists of codes (keys) that need to be mapped to their corresponding names (values) for display in the grid.
Here’s an example of how this data can be structured:

```javascript
// Data from server
const rowData = [
    { prod: 'toy', price: 28000 },
    { prod: 'bmw', price: 55000 },
    // ...
];

// Supporting reference data
const carMappings = {
    'toy': 'Toyota',
    'bmw': 'BMW',
    'aud': 'Audi',
    'hnd': 'Honda'
};
``` */}

## Strategies for Managing Reference Data

Value handlers provide a flexible way to map codes to display values. This method involves more coding but allows for greater customization in how data is formatted and saved.

- **Value Formatter**: Converts the key to a user-friendly value for display in the grid.
- **Value Parser**: Converts the user-selected value back into a key for saving in the underlying data.

{/* #### Example Configuration

Here’s how you can configure the grid to use value handlers:

```javascript
const gridOptions = {
    columns: [
        {
            prop: 'prod',
            cellTemplate: (h, params) => carMappings[params.value], // Convert code to name
        },
        cellCompare: (a, b) => { // Map data for sorting
            return carMappings[a] - carMappings[b];
        },
        cellParser: (model, column) => { // Map data for filtering, editing and saving
            return carMappings[model[column.prop]];
        }
    ],
    // Other grid options...
};
``` */}

## Conclusion

Effectively managing reference data is essential for ensuring that users see meaningful labels alongside coded values.

<div hidden>

```javascript
// fixing render for multiframework
```

</div>
