Is there any way to force the radribbongroup into not center the header horizontally (I want strech)?
Thanks
Inger Marie
Hello,
We are currently using some of your components and we are facing a lot of issues while using RadTreeView.
Most of them are related to drag/drop operations and the new position of the item in the new TreeView.
As you can see in the video that i attatched everything is working fine until the middle of the video after dragging 5 items to the new TreeView the drag template becomes unstable and blinks, after adding that one to the tree you are not able to keep dragging more items.
The only thing that we modifed is the item template and we are using the latest binaries of UI for WPF.
What we can do?
Thanks
Here you can find the video
https://www.dropbox.com/s/xy6pgw5toynbvpk/dragIssue.mp4?dl=0

Hi,
I have a fairly simple scenario that I am having trouble with. I have a custom data annotation as shown below. It just makes sure that at least one item in my collection has it's IsSelected flag set. This collection is bound to an ItemsControl of checkboxes. The xaml is at the bottom. The validation works correctly but the error message displayed in summary at the bottom if the form is not red and is prefixed with a colon. Is there a way to make this a little better and more consistent with "normal" dataannotation validations so that the ItemsControl or containing stackpanel is highlighted in a similar fashion as a textbox might be highlighted?
Thanks ... Ed
public class HasOneItem : ValidationAttribute{ public HasOneItem() {} protected override ValidationResult IsValid(object value, ValidationContext validationContext) { if (value != null) { ObservableCollection<SampleTechniqueInfo> sti = (ObservableCollection<SampleTechniqueInfo>)value; if ((from a in sti where a.IsSelected == true select a).Count() == 0) { var errorMessage = FormatErrorMessage(validationContext.DisplayName); return new ValidationResult(errorMessage); } } return ValidationResult.Success; }}
<StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="2" Grid.RowSpan ="5"> <Label Content="Associated Techniques:" HorizontalAlignment="Left" HorizontalContentAlignment="Left" Width="350" Height="auto"/> <StackPanel Orientation="Vertical" MaxHeight="210" > <ItemsControl x:Name ="lstTechniques" ItemsSource="{Binding AssociatedTechniques }" Margin="5,0,0,0" > <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <support:UniformGridWithOrientation Orientation="Vertical" Columns="4" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate > <CheckBox Content="{Binding TechniqueAbbr}" IsChecked="{Binding IsSelected, Mode=TwoWay}" ToolTip="{Binding TechniqueName}" > </CheckBox> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </StackPanel></StackPanel>From the drag drop examples on the site, the dragging and dropping within and between grid views is more or less working how we want. But I would like to change the icon in the visual associated with the "effect" and I can't seem to figure out how and where to do it. We have a content template but that only affects the rest of the visual and not the "effect" portion of it.
I tried inheriting from the DragVisual but there are so many overridable things within I can't tell what is needed to be done. One thing however that was particularly interesting, is that when I inherit from the DragVisual but do not override anything within, the "move" icon is gray instead of blue.
I am trying to achieve displaying a delete icon if the user drags an item outside of the grid to indicate that the item will be removed rather than the "no" icon which implies that the action will have no result. Please advise if there is a simpler way to do this.
Hello Telerik,
During a Drag&Drop in a RadTreeView, I encounter some troubles with TreeViewDragDropOptions where the dropped item is positioned. Ideally I would like to get the objects that are positioned before and after (if they exist) the dropped item.
However, following multiple found example (like this one), in my case, the content of TreeViewDragDropOptions is always null.
Those are the objects I am binding to the TreeView:
Node.cs
public class Node<T>{ public T Source { get; set; } public Node<T> Parent { get; set; } public List<Node<T>> Children = new List<Node<T>>();}
Here T is a Category
Category.cs
public class Category{ public string Title { get; set; } public int Sort { get; set; }}
In the ViewModel, an ObservableCollection contains the hierarchy.
public ObservableCollection<Node<Category>> MyCategories{ [...]}
Finally, the Views:
MyView.xaml
<telerik:RadTreeListView Name="CategoriesRadTreeView" IsDragDropEnabled="True" telerik:TreeViewSettings.DragDropExecutionMode="New" ItemsSource="{Binding MyCategories}" AutoGenerateColumns="False"> <telerik:RadTreeListView.ChildTableDefinitions> <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" /> </telerik:RadTreeListView.ChildTableDefinitions> <telerik:RadTreeListView.SortDescriptors> <telerik:SortDescriptor Member="Source.Sort" SortDirection="Ascending" /> </telerik:RadTreeListView.SortDescriptors> <telerik:RadTreeListView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Source.Title}" Header="Title" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Source.Sort}" Header="Sort" /> </telerik:RadTreeListView.Columns></telerik:RadTreeListView>
And the code behind:
MyView.xaml.cs
public WebstoreKatalogView(){ InitializeComponent(); DragDropManager.AddDragInitializeHandler(CategoriesRadTreeView, OnDragInitialize); DragDropManager.AddDragOverHandler(CategoriesRadTreeView, OnDragOver, true); DragDropManager.AddDropHandler(CategoriesRadTreeView, OnDrop);}private void OnDragInitialize(object sender, DragInitializeEventArgs e){ e.AllowedEffects = DragDropEffects.All; var payload = DragDropPayloadManager.GeneratePayload(null); var data = ((FrameworkElement)e.OriginalSource).DataContext; payload.SetData("DragData", data); e.Data = payload; e.Handled = true;}private void OnDragOver(object sender, Telerik.Windows.DragDrop.DragEventArgs e){ var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions; if (options != null) { // never reaches here! }}private void OnDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs e){ // this works! var node = DragDropPayloadManager.GetDataFromObject(e.Data, "DragData");}
I have no idea what is wrong or what could be missing.
Thank you very much for your help!
Sylvain
I've tried all the options for KeyboardNavigation.TabNavigation and none of them seem to get the desired result. How to enable tabbing through fields of a RadDataForm displayed via a RadGridView row details template?
Thanks ... Ed

