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

How do I get a grid like dropdown with columns headers

1 Answer 80 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Bill Anderson
Top achievements
Rank 1
Bill Anderson asked on 21 Nov 2009, 05:32 PM
Hi,

For my combobox I have a custom data template as follows

<DataTemplate x:Key="ComboBoxCustomTemplate"
                <Grid Margin="5,5,5,5"
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="150" /> 
                        <ColumnDefinition Width="150"/> 
                        <ColumnDefinition Width="150"/> 
                        <ColumnDefinition Width="75"/> 
                        <ColumnDefinition Width="100"/> 
                        <ColumnDefinition Width="50"/> 
                        <ColumnDefinition Width="50"/> 
                    </Grid.ColumnDefinitions> 
                    <TextBlock Grid.Column="0" Text="{Binding Name}" /> 
                    <TextBlock Grid.Column="1" Text="{Binding Address}" /> 
                    <TextBlock Grid.Column="2" Text="{Binding City}" /> 
                    <TextBlock Grid.Column="3" Text="{Binding ClaimNumber}" /> 
                    <TextBlock Grid.Column="4" Text="{Binding Status}" /> 
                    <TextBlock Grid.Column="5" Text="{Binding Assigned}" /> 
                    <TextBlock Grid.Column="6" Text="{Binding EntityId}" /> 
                </Grid> 
            </DataTemplate> 

This gives a nice grid like look. for the drop down. But how do i get column headers for each column so that they don't repeat with each bound item?

thanks!

1 Answer, 1 is accepted

Sort by
0
Pana
Telerik team
answered on 26 Nov 2009, 08:29 AM
Hi Bill Anderson,

There is no out-of-the-box solution for this.

One option for you would be to create custom ComboBox stlye where the combobox popup have modified template and renders the header while the data is rendered by the ComboBoxItems.

Another option would be to use dropdown button with RadGrid in it's popup. We have an example with the dropdown button and treeiew in it:
http://demos.telerik.webdev64.telerik.com/silverlight/2009-Q3/#Buttons/DropDownButton

All the best,
Panayot
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
Bill Anderson
Top achievements
Rank 1
Answers by
Pana
Telerik team
Share this question
or