This question is locked. New answers and comments are not allowed.
Hi,
When i place RadGridView in RadWindow, it doesnt allow to Group even when "ShowGroupPanel" is set to true
As soon as i put it out of RadWindow it works...
Please help me... the XAML and C# code as follow...
When i place RadGridView in RadWindow, it doesnt allow to Group even when "ShowGroupPanel" is set to true
As soon as i put it out of RadWindow it works...
Please help me... the XAML and C# code as follow...
| <UserControl x:Class="GridViewGrouping.MainPage" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" |
| xmlns:RadGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" |
| Width="700" Height="500"> |
| <Grid x:Name="LayoutRoot" Background="White"> |
| <StackPanel> |
| <Button Width="150" Height="30" Click="Button_Click" Content="Open RadWindow"></Button> |
| </StackPanel> |
| <controls:RadWindow x:Name="myRadWindow" > |
| <RadGrid:RadGridView x:Name="gridView" AutoGenerateColumns="True" |
| Margin="5,5,5,5" ColumnsWidthMode="None" IsReadOnly="True" |
| ScrollMode="RealTime" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" |
| IsFilteringAllowed="False" ShowGroupPanel="True" VerticalGridlinesVisibility="Visible" /> |
| </controls:RadWindow> |
| </Grid> |
| </UserControl> |
| namespace GridViewGrouping |
| { |
| public partial class MainPage : UserControl |
| { |
| public MainPage() |
| { |
| InitializeComponent(); |
| gridView.ItemsSource = User.LoadUsers(); |
| } |
| private void Button_Click(object sender, RoutedEventArgs e) |
| { |
| myRadWindow.Show(); |
| } |
| } |
| public class User |
| { |
| public int ID { get; set; } |
| public string FirstName { get; set; } |
| public string LastName { get; set; } |
| public static User[] LoadUsers() |
| { |
| User[] users = new User[]{ |
| new User(){ID = 1, FirstName = "a", LastName="b"}, |
| new User(){ID = 2,FirstName = "aa", LastName="bb"}, |
| new User(){ID = 3,FirstName = "aaa", LastName="bbb"}, |
| new User(){ID = 4,FirstName = "aa", LastName="bbb"}, |
| new User(){ID = 5,FirstName = "aaa", LastName="bb"}, |
| new User(){ID = 6,FirstName = "aaa", LastName="bb"}, |
| }; |
| return users; |
| } |
| } |
| } |
