Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom templated combobox with special non templated item
    text
    copied!<p>I have a RadTreeView, in each item there is a RadCombobox with some elements. Now I need to add some "special" item into each combobox. User can click on this item to add new element in combobox: <img src="https://i.stack.imgur.com/9ozMK.jpg" alt="enter image description here"></p> <p>My current code:</p> <pre><code>&lt;DataTemplate x:Key="Monitor"&gt; &lt;Grid Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="16" /&gt; &lt;ColumnDefinition Width="*" /&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Image Grid.Column="0" Height="16" Width="16" Source="icons\monitor.png" /&gt; &lt;TextBlock Text="{Binding Name}" Margin="5 0 0 0" Grid.Column="1" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Center"/&gt; &lt;!-- PROBLEM IS HERE --&gt; &lt;telerik:RadComboBox Name="RadComboSchedule" Grid.Column="2" Margin="10 0 0 0" Width="155" ItemsSource="{Binding Source={StaticResource DataSource}, Path=ScheduleDataSource}" ItemTemplate="{StaticResource ComboBoxTemplate}" &gt; &lt;/telerik:RadComboBox&gt; &lt;Button Name="BtnRemoveMonitor" Grid.Column="3" Style="{StaticResource ButtonListBoxItemStyle}" Template="{StaticResource RemoveButtonTemplate}" /&gt; &lt;/Grid&gt; &lt;/DataTemplate&gt; &lt;HierarchicalDataTemplate x:Key="Group" ItemTemplate="{StaticResource Monitor}" ItemsSource="{Binding Monitors}"&gt; &lt;TextBlock Text="{Binding Name}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/&gt; &lt;/HierarchicalDataTemplate&gt; &lt;telerik:RadTreeView Name="RadTreeViewGroups" Height="auto" Width="auto" ItemsSource="{Binding Source={StaticResource DataSource}, Path=GroupsDataSource}" ItemTemplate="{StaticResource Group}" &gt; &lt;/telerik:RadTreeView&gt; </code></pre> <p>So, I have all like at a screenshot without element "Add new item". Any ideas?</p> <p>PS It's not a problem to use standard WPF Combobox and TreeView controls.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload