This question is locked. New answers and comments are not allowed.
I have found that when a RadGridView is placed in a RadWindow, the user cannot move columns or do column grouping. Below is code to reproduce. I have a canvas where I have placed a grid - as well as a similar grid inside a RadWindow. When you run this code you can move and group by columns when using the grid on the canvas, but not the one in the RadWindow. Is there a workaround for this?
Person Class:
| <UserControl xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" x:Class="GridInsideWindowBug.Page" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| Width="600" Height="400"> |
| <Canvas x:Name="LayoutRoot" Background="AliceBlue"> |
| <Button Content="Show Window" Width="90" Height="25" Click="Button_Click"/> |
| <telerikGridView:RadGridView x:Name="gdRegular" Canvas.Top="30" Width="300" Height="200" AutoGenerateColumns="True"/> |
| <telerikNavigation:RadWindow x:Name="rwGrid" Width="300" Height="200"> |
| <telerikGridView:RadGridView x:Name="gdWindow" Width="300" Height="200" AutoGenerateColumns="True"/> |
| </telerikNavigation:RadWindow> |
| </Canvas> |
| </UserControl> |
namespace GridInsideWindowBug |
| { |
| public partial class Page : UserControl |
| { |
| public Page() |
| { |
| InitializeComponent(); |
| this.Loaded += new RoutedEventHandler(Page_Loaded); |
| } |
| private void Page_Loaded(object sender, RoutedEventArgs e) |
| { |
| gdRegular.ItemsSource = GetPeople.GetData(); |
| gdWindow.ItemsSource = GetPeople.GetData(); |
| } |
| private void Button_Click(object sender, RoutedEventArgs e) |
| { |
| rwGrid.Show(); |
| } |
| } |
| } |
| public class Person |
| { |
| public int PersonID { get; set; } |
| public string FirstName { get; set; } |
| public string LastName { get; set; } |
| public Person(int PersonID, string FirstName, string LastName) |
| { |
| this.PersonID = PersonID; |
| this.FirstName = FirstName; |
| this.LastName = LastName; |
| } |
| } |
| public static class GetPeople |
| { |
| public static List<Person> GetData() |
| { |
| List<Person> result = new List<Person>(); |
| result.Add(new Person(1, "Thorgron", "Smifocon")); |
| result.Add(new Person(2, "Speevo", "Gleeb")); |
| return result; |
| } |
| } |