This question is locked. New answers and comments are not allowed.
I have an issue with a GridView User Control as the content (with alignments set to Stretch) within a RadWindow. When I resize the window enough to cover the data rows in the Grid the web browser locks up and I cannot continue within the current session. This occurs in both IE 6 and FireFox.
I was able to write a couple sample xamls to illustrate the issue I am having. After you open the new window and resize the window smaller (towards as small as it can go) the browser will hang.
Following are the sample xaml snippets.
Thank you for your help.
- Jeremy
Page.xaml (startup)
Page.xaml.cs
ExampleGrid.xaml
ExampleGrid.xaml.cs
I was able to write a couple sample xamls to illustrate the issue I am having. After you open the new window and resize the window smaller (towards as small as it can go) the browser will hang.
Following are the sample xaml snippets.
Thank you for your help.
- Jeremy
Page.xaml (startup)
| <UserControl x:Class="WindowExample.Page" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| Width="400" Height="300"> |
| <Grid x:Name="LayoutRoot" Background="White"> |
| <Button x:Name="OpenWindowButton" Content="Open New Window" Width="150" Height="25" Click="OpenWindowButton_Click"/> |
| </Grid> |
| </UserControl> |
Page.xaml.cs
| using System.Windows; |
| using System.Windows.Controls; |
| using Telerik.Windows.Controls; |
| namespace WindowExample { |
| public partial class Page : UserControl { |
| public Page() { |
| InitializeComponent(); |
| } |
| private void OpenWindowButton_Click(object sender, RoutedEventArgs e) { |
| RadWindow NewWindow = new RadWindow(); |
| NewWindow.Content = new ExampleGrid(); |
| NewWindow.Show(); |
| } |
| } |
| } |
ExampleGrid.xaml
| <UserControl x:Class="WindowExample.ExampleGrid" |
| 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.GridView" |
| xmlns:GridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" |
| > |
| <Grid x:Name="LayoutRoot" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
| <Controls:RadGridView Name="sampleRadGridView" ColumnsWidthMode="Fill" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
| <Controls:RadGridView.Columns> |
| <GridView:GridViewDataColumn HeaderText="CustomerID" IsReadOnly="True" UniqueName="CustomerID" /> |
| <GridView:GridViewDataColumn HeaderText="CompanyName" IsReadOnly="True" UniqueName="CompanyName" /> |
| <GridView:GridViewDataColumn HeaderText="Country" UniqueName="Country" /> |
| <GridView:GridViewDataColumn HeaderText="City" UniqueName="City" /> |
| <GridView:GridViewDataColumn HeaderText="ContactName" UniqueName="ContactName" /> |
| </Controls:RadGridView.Columns> |
| </Controls:RadGridView> |
| </Grid> |
| </UserControl> |
ExampleGrid.xaml.cs
| using System; |
| using System.Collections.ObjectModel; |
| using System.Windows.Controls; |
| using Telerik.Windows; |
| using Telerik.Windows.Controls.GridView; |
| using Telerik.Windows.Controls.GridView.Rows; |
| namespace WindowExample { |
| public partial class ExampleGrid : UserControl { |
| private ObservableCollection<Customer> dataSource = new ObservableCollection<Customer>(); |
| public ExampleGrid() { |
| InitializeComponent(); |
| SetCustomerDataSource(); |
| this.sampleRadGridView.AddHandler(GridViewRow.EditEndedEvent, new EventHandler<RecordRoutedEventArgs>(this.OnEditEnded)); |
| this.sampleRadGridView.ItemsSource = this.dataSource; |
| } |
| private void OnEditEnded(object sender, RecordRoutedEventArgs e) { |
| } |
| private void SetCustomerDataSource() { |
| for (int i = 0; i < 10; i++) { |
| Customer aCustomer = new Customer(); |
| aCustomer.CustomerID = i.ToString(); |
| aCustomer.ContactName = "Customer " + i.ToString(); |
| dataSource.Add(aCustomer); |
| } |
| } |
| } |
| public class Customer { |
| public string CustomerID { get; set; } |
| public string CompanyName { get; set; } |
| public string Country { get; set; } |
| public string City { get; set; } |
| public string ContactName { get; set; } |
| public bool Bool { get; set; } |
| }} |