We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to display Multi Column data information in ComboBoxAdv?

Platform: WPF |
Control: ComboBoxAdv

In ComboBoxAdv, there is no direct option to show multiple column information in the ComboBoxItemAdv and it can be achieved by editing the ComboBoxItemAdv template using ItemTemplate property of the ComboBoxAdv. 


The following code demonstrates the same.

Code Example: [XAML]

        <DataTemplate x:Key="ComboBoxMultiColumnTemplate" >
            <Border x:Name="Bd" CornerRadius="0" SnapsToDevicePixels="true" VerticalAlignment="Center" HorizontalAlignment="Center">
                <Grid >
                        <ColumnDefinition  />
                        <ColumnDefinition  />
                    <TextBlock Name="column1" Text="{Binding Path=SalesDistrictName}" FontSize="14"   Margin="0,0,5,0"  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"  />
                    <TextBlock Name="column2" Text="{Binding Path=SalesRepresentativeName}" FontSize="14" Grid.Column="1"  Margin="5,0,0,0"  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
        <sf:ComboBoxAdv Height="50" Width="250" ItemsSource="{Binding ModelList}"  VerticalContentAlignment="Center" HorizontalAlignment="Center" AllowMultiSelect="True"  MaxDropDownHeight="300" ItemTemplate="{StaticResource ComboBoxMultiColumnTemplate}"/>


multicolumn combo box



Sample [C#]: MultiColumnComboBoxSample


2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile