This is a migrated thread and some comments may be shown as answers.

[Solved] Can we have multiline column header?

1 Answer 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Virendra
Top achievements
Rank 1
Virendra asked on 08 May 2009, 10:51 AM
thanks
virendra

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 May 2009, 02:58 PM
Hi Virendra,

With our Q2 release you will be able to define complex column headers and together with cell templates you can achieve desired result:

        <telerik:RadGridView x:Name="RadGridView1" AutoGenerateColumns="False"
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Property1}"
                    <telerik:GridViewDataColumn.Header> 
                        <Grid> 
                            <Grid.ColumnDefinitions> 
                                <ColumnDefinition /> 
                                <ColumnDefinition /> 
                            </Grid.ColumnDefinitions> 
                            <Grid.RowDefinitions> 
                                <RowDefinition /> 
                                <RowDefinition /> 
                            </Grid.RowDefinitions> 
                            <TextBlock Text="Property1" /> 
                            <TextBlock Text="Property2" Grid.Column="1" /> 
                            <TextBlock Text="Property3" Grid.Row="1" /> 
                        </Grid> 
                    </telerik:GridViewDataColumn.Header> 
                    <telerik:GridViewDataColumn.CellTemplate> 
                        <DataTemplate> 
                            <Grid> 
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition /> 
                                    <ColumnDefinition /> 
                                </Grid.ColumnDefinitions> 
                                <Grid.RowDefinitions> 
                                    <RowDefinition /> 
                                    <RowDefinition /> 
                                </Grid.RowDefinitions> 
                                <TextBlock Text="{Binding Property1}" /> 
                                <TextBlock Text="{Binding Property2}" Grid.Column="1" /> 
                                <TextBlock Text="{Binding Property3}" Grid.Row="1" /> 
                            </Grid> 
                        </DataTemplate> 
                    </telerik:GridViewDataColumn.CellTemplate> 
                    <telerik:GridViewDataColumn.CellEditTemplate> 
                        <DataTemplate> 
                            <Grid> 
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition /> 
                                    <ColumnDefinition /> 
                                </Grid.ColumnDefinitions> 
                                <Grid.RowDefinitions> 
                                    <RowDefinition /> 
                                    <RowDefinition /> 
                                </Grid.RowDefinitions> 
                                <TextBox Text="{Binding Property1}" /> 
                                <TextBox Text="{Binding Property2}" Grid.Column="1" /> 
                                <TextBox Text="{Binding Property3}" Grid.Row="1" /> 
                            </Grid> 
                        </DataTemplate> 
                    </telerik:GridViewDataColumn.CellEditTemplate> 
                </telerik:GridViewDataColumn> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 


Kind regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Virendra
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or