Working on a project where I have a cell template DataContext bound to the GridViewCell Value.
<DataTemplate x:Key="DefaultCellTemplate">
<StackPanel DataContext="{Binding Value, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewCell}}}">
<TextBlock Text="{Binding PropertyValue, Mode=OneWay}"></TextBlock>
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="DefaultCellEditTemplate">
<StackPanel DataContext="{Binding Value, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewCell}}}">
<TextBox Text="{Binding PropertyValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></TextBox>
</StackPanel>
</DataTemplate>
When entering values and tabbing through cells, when on the last cell and tab to move to first cell of the next column, I'm getting an app crash. This seems to occur when virtualization is on and there are enough columns to cause the grid to scroll horizontally, and the UpdateSourceTrigger of the edit template is PropertyChanged. Attached is a sample project that can reproduce the error.
I have a RadTreeView with some Containers and some Items (the items do not contain other items). When I activate Drag and Drop everything works fine. My problem is that I have some Containers that should not work as drop target. Unfortunatly I could not find an example.
First I tried the property IsDroppingAllowed (I used it like IsExpanded and IsSelected). Unfortunatly the getter is never called.
Than I tried "OnDragOver"
DragDropManager.AddDragOverHandler(this.FolderRadTreeView, new Telerik.Windows.DragDrop.DragEventHandler(OnDragOver), true);options.DropAction = DropAction.Move;or
options.DropAction = DropAction.None;and everything works fine. But after a while it drives me crazy. Is there anywhere a good example? Is there anywhere a checklist what I have to reimplement?
I tried to use the DropTargetItem to check if the dropping is allowed.
var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;var dropItem = options.DropTargetItem.Item;(dropItem as IFolderItem).IsDroppable(options.DraggedItems));If I drop inside everthing is fine. If I drop before (Telerik.Windows.Controls.DropPosition.
Before) it seems that my dropItem I used for IsDroppable() is not the container where the RadTreeView drops my item.
An other trapdoor it that I have to check that I do not drag an Item in itself (drag A and drop it in A or drop in a child of A).

Hi team,
I am using custom Connectors and Connections along with MVVM. Per the thread, I can add some custom connection points in the overridden method GetConnectionContainerForItemOverride,
protected override IConnection GetConnectionContainerForItemOverride(object item){ if (item is Link) { ...return a custom connection object;
} return null;}Meanwhile I want to attach the connection to my custom connectors inside this method. However, at this time, the connectors of the shape still are the 5 default connectors. Are there any means to control the sequence of the overwritten methods? Or I should overwrite another virtual method?
Thanks,
Jingfei
There is a bug in RadListBox when using GroupStyle. When I select any an item from second group, radlistbox scrolls to first item in second group. This makes double click on an items almost imposible.
I wrote a simple sample demonstrating the behaviour with comparison to regular listbox
<Window x:Class="RadControlsWpfApp2.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:local="clr-namespace:RadControlsWpfApp2" Title="MainWindow" Height="350" Width="525"> <Window.DataContext> <local:MainWindowVM /> </Window.DataContext> <Grid> <StackPanel Orientation="Horizontal"> <ListBox x:Name="listbox" ItemsSource="{Binding CollectionView}" IsSynchronizedWithCurrentItem="False" DisplayMemberPath="Name" FontSize="20" MinWidth="150"> <ListBox.GroupStyle> <GroupStyle /> </ListBox.GroupStyle> </ListBox> <telerik:RadListBox x:Name="radlistbox" ItemsSource="{Binding CollectionView}" DisplayMemberPath="Name" FontSize="20" MinWidth="150" Margin="20,0,0,0"> <telerik:RadListBox.GroupStyle> <GroupStyle /> </telerik:RadListBox.GroupStyle> </telerik:RadListBox> </StackPanel> </Grid></Window>
using System.Collections.Generic;using System.Windows.Data;namespace RadControlsWpfApp2{ public class MainWindowVM { public List<ItemVM> Collection { get; set; } public ListCollectionView CollectionView { get; set; } public MainWindowVM() { Collection = new List<ItemVM> { new ItemVM { Group = "A", Name = "Item 1" }, new ItemVM { Group = "A", Name = "Item 2" }, new ItemVM { Group = "A", Name = "Item 3" }, new ItemVM { Group = "A", Name = "Item 4" }, new ItemVM { Group = "A", Name = "Item 5" }, new ItemVM { Group = "A", Name = "Item 6" }, new ItemVM { Group = "B", Name = "Item 1" }, new ItemVM { Group = "B", Name = "Item 2" }, new ItemVM { Group = "B", Name = "Item 3" }, new ItemVM { Group = "B", Name = "Click Here!" }, new ItemVM { Group = "B", Name = "Item 5" }, new ItemVM { Group = "B", Name = "Item 6" }, }; var view = new ListCollectionView(Collection); view.GroupDescriptions.Add(new PropertyGroupDescription("Group")); CollectionView = view; } } public class ItemVM { public string Group { get; set; } public string Name { get; set; } }}
Hello,
I have a custom control which inherits from usercontrol. My control is the itemtemplate of a radtreeview.
<telerik:RadTreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding MyList}">
<MyControls:MyTreeNode AllowDrop="{Binding IsDropAllowed}"/>
</HierarchicalDataTemplate>
</telerik:RadTreeView.ItemTemplate>
I want to
bind the AllowDrop Property from my control (MyTreeNode). When AllowDrop is
false, it should not possible to
drop other nodes on this node. But this doesn’t work. The radtreeview ignores the allocation. Is there any way that my
control has the same behavior likes a radtreeviewitem, when the IsDropAllowed
Property is false.
With best regards,
Sico
Hi, I want the time bar to show hours in European format (e.g 23 and not 11 PM).
The only way I found to achieve this is to set the global Telerik.Windows.Controls.LocalizationManager.DefaultCulture.
