Hello,
The code is as follows
Window1.xaml
<Window
Title="Window1" mc:Ignorable="d" Loaded="Window_Loaded">
<Window.Resources>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<telerik:RadComboBox Grid.Row="0" x:Name="cbTest2" IsFilteringEnabled="True" TextSearchMode="Contains" DisplayMemberPath="Name" IsSynchronizedWithCurrentItem="False" />
<telerik:RadComboBox Grid.Row="1" x:Name="cbTest" IsFilteringEnabled="True" TextSearchMode="Contains" IsSynchronizedWithCurrentItem="False" >
<telerik:RadComboBox.ItemTemplate>
<DataTemplate>
<Grid Focusable="False" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ToolTipService.ToolTip>
<Border CornerRadius="2" VerticalAlignment="Top">
<Grid Margin="8" MaxWidth="450" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0" Content="Address" Padding="0"/>
<Label Grid.Column="1" Grid.Row="0" Content="{Binding Adress}" Padding="0"/>
<Label Grid.Column="0" Grid.Row="1" Content="City" Padding="0"/>
<Label Grid.Column="1" Grid.Row="1" Content="{Binding City}" Padding="0"/>
</Grid>
</Border>
</ToolTipService.ToolTip>
<Label Grid.Column="0" Grid.Row="2" Content="{Binding Name}" Padding="0"/>
</Grid>
</DataTemplate>
</telerik:RadComboBox.ItemTemplate>
</telerik:RadComboBox>
</Grid>
</Window>
Window1.xaml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Scheduler;
using Telerik.Windows.Controls.DragDrop;
using System.Collections.ObjectModel;
namespace RadTestProject
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : Window
{
public Window1()
{
RadDragAndDropManager.ExecutionMode = DragExecutionMode.Legacy;
InitializeComponent();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
ObservableCollection<Customer> testcol = new ObservableCollection<Customer>();
testcol.Add(new Customer() { Name = "Acust", Adress = "addr A", City = "city A" });
testcol.Add(new Customer() { Name = "Bcust", Adress = "addr B", City = "city B" });
testcol.Add(new Customer() { Name = "Dcust", Adress = "addr D", City = "city D" });
testcol.Add(new Customer() { Name = "Gcust", Adress = "addr G", City = "city G" });
testcol.Add(new Customer() { Name = "Zcust", Adress = "addr Z", City = "city Z" });
cbTest.ItemsSource = testcol;
cbTest2.ItemsSource = testcol;
}
}
}
Now what I want is the search/filter/jump function of the first combobox. But to be able to display a tooltip per row as in the second combobox.
Regards,
Kevin