# Transpose Data in Grid

## Content



In FlexGrid control, the transpose feature flips the rows and columns so that the headers display on the left side and rows display across the screen. Transposed layouts are especially useful for comparing items, or displaying few data items in which each items has many properties. In FlexGrid, the transposed behavior can be simply enabled by using the **TransposedGridBehavior** class. The following image shows transpose behavior in FlexGrid control:

![Transpose Grid](https://cdn.mescius.io/document-site-files/images/3ca88af8-b501-48d7-a446-601c9251a2fb/images/flexgrid_transpose_gif.gif)

Perform the following steps to use the transpose feature in flexgrid control

1.  Add the following code in the XAML view to display transpose of rows into columns in the FlexGrid control:
    
    ```xml
    <c1:FlexGrid x:Name="grid">
        <i:Interaction.Behaviors>
            <c1:TransposedGridBehavior/>
        </i:Interaction.Behaviors>
    </c1:FlexGrid>
    ```
    
2.  Switch to code view and add the following code to bind FlexGrid control with datasource:
    
    ```csharp
    grid.ItemsSource = Customer.GetCustomerList(100);
    grid.MinColumnWidth = 85;
    ```