# Edit the Grid's Header on Double-Click

## Environment

<table>
    <tbody>
	    <tr>
	    	<td>Product Version</td>
	    	<td>3.3.2</td>
	    </tr>
	    <tr>
	    	<td>Product</td>
	    	<td>Progress® Kendo UI for Vue</td>
	    </tr>
    </tbody>
</table>

## Description

The below example implements a logic that allows you to edit the column headers of the Grid when double-clicking on each of them.

**KB sections**

* [Solution description](https://www.telerik.com/kendo-vue-ui/components/knowledge-base/grid-edit-column-headers-on-double-click#solution-description)
* [Runnable example](https://www.telerik.com/kendo-vue-ui/components/knowledge-base/grid-edit-column-headers-on-double-click#runnable-example)

## Solution description

To edit the Grid's headers on the fly, we have to use the [headerCell](https://www.telerik.com/kendo-vue-ui/components/grid/api/gridcolumnprops#headercell) property of the `Grid's` columns and define a custom header for each column. The below example uses the following template that is passed to the `headerCell` prop of all column.

```js
<template #headerTemplate="{ props }">
    <span
    v-if="!getColumnItem(props).headerInEdit"
    @dblclick="(e) => customHandler(e, props)"
    >{{ props.title }}</span
    >
    <span v-else
    ><k-input
        @blur="onBlur(props)"
        @input="(e) => onInput(e, props)"
        type="text"
        :value="props.title"
    /></span>
</template>
```

With the above, the default behavior of the header will be to show the current value of its title(defined in the `columns` array). Then if we double-click on a random header, it will enter in **edit** mode by which you can change the `title` value.

### Runnable example

[Demo Source](https://demos.telerik.com/kendo-vue-ui/knowledge-base/grid-edit-column-headers-on-double-click/source.txt)
