# Customizing Columns

There are three parts of the column that can be customized separately from each other:

* [Content Cells](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/customizing-columns#content-cells)
* [Footer Cells](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/customizing-columns#footer-cells)
* [Header Cells](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/customizing-columns#header-cells)
* [Text Properties](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/customizing-columns#text-properties)

## Content Cells

To change the default appearance of a cell you have to either style it or template it:

* In order to template it use **CellTemplate** property.
* If you want to style it, define an appropriate style targeting all elements of the type or set is as **CellStyle** for a column. To learn more read the [Styling a Cell](https://www.telerik.com/products/wpf/documentation/controls/radgridview/styles-and-templates/styling-cell) chapter.
* You can also change the default look of a cell when it is in edit mode by setting an appropriate **CellEditTemplate**.

This [help article](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/celltemplate-and-celledittemplate) explains how to set **CellTemplate/CellEditTemplate** in details.

> In a scenario when there is a column.CellEditTemplate defined, the new value of the editor is not available in the arguments of the **CellEditEnded** event raised when commiting an edit. To get the right value in **e.NewValue**, you can create your own [custom column](https://www.telerik.com/products/wpf/documentation/controls/radgridview/managing-data/how-to/howto-create-custom-editor) and override its **GetNewValueFromEditor** method.

This [help article](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/how-to/add-button-column) explains how to create a **custom column with a button** in details.

This [help article](https://www.telerik.com/products/wpf/documentation/controls/radgridview/managing-data/how-to/howto-create-custom-editor) explains how to create a **column with a custom editor** in details.

You can also check [CellStyleSelector](https://www.telerik.com/products/wpf/documentation/controls/radgridview/style-selectors/cell-style-selector) and [CellTemplateSelector](https://www.telerik.com/products/wpf/documentation/controls/radgridview/template-selectors/cell-template-selector) topics on how to conditionally apply a cell style or a cell template.

## Footer Cells

RadGridView provides a way to change the default look and appearance of both column and group footers:

* to change column footers' style use **FooterCellStyle** property. To learn more read the [Styling the Column Footers](https://www.telerik.com/products/wpf/documentation/controls/radgridview/styles-and-templates/styling-column-footers) topic.
* to customize group footers' style use **GroupFooterCellStyle** property. To learn more read the [Styling the Group Footers](https://www.telerik.com/products/wpf/documentation/controls/radgridview/styles-and-templates/styling-group-footers) topic.

To learn more about the group footers take a look at the [Group Footers](https://www.telerik.com/products/wpf/documentation/controls/radgridview/grouping/group-footers) topic. For the column footers visit the [Column Footers](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/column-footers) topic.

## Header Cells

To change the look and the appearance of header cells you have to define an appropriate style and set it to the **HeaderCellStyle** property of the column. To learn how to do that take a look at the [Styling the Column Headers](https://www.telerik.com/products/wpf/documentation/controls/radgridview/styles-and-templates/styling-column-headers) topic.

To learn more about the column headers take a look at the [Column Headers](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/column-headers) topic.

> The customizations apply to all cells of a type.

## Text Properties

**GridViewColumn** provides out-of-the-box mechanism for customizing the visual appearance of its text content. This can be achieved through the **TextWrapping**, **TextAlignment**, **TextTrimming** and **TextDecorations** properties.

**Example 1: Setting the Text Properties of GridViewColumn**

```XAML
<telerik:RadGridView Name="clubsGrid" 
                    ItemsSource="{Binding Clubs}"
                    AutoGenerateColumns="False"
                    GroupRenderMode="Flat"
                    Margin="5">
           <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" 
                                        TextWrapping="Wrap"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
                                        TextAlignment="Right"
                                        Header="Est." 
                                        DataFormatString="{}{0:yyyy}"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}"
                                        TextTrimming="WordEllipsis"
                                        Header="Stadium" 
                                        DataFormatString="{}{0:N0}"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding FanClubCount}"
                                       TextDecorations="Underline"/>
   		</telerik:RadGridView.Columns>
</telerik:RadGridView>
```

> caption GridViewColumn with customized text properties

![Telerik UI for WPF RadGridView GridViewColumn using custom text wrapping, alignment, trimming, and decorations](https://www.telerik.com/products/wpf/documentation/assets/2b32b48ccd65f5a0ee999aeb739475a1/gridview-textproperties-column.png)

## See Also

* [Data Formatting](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/data-formatting)
* [Column Headers](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/column-headers)
* [Column Footers](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/column-footers)
* [Add button column](https://www.telerik.com/products/wpf/documentation/controls/radgridview/columns/how-to/add-button-column)
* [Create Custom Editor with RadGridView](https://www.telerik.com/products/wpf/documentation/controls/radgridview/managing-data/how-to/howto-create-custom-editor)
