This is a migrated thread and some comments may be shown as answers.

[Solved] Using arrow keys to vertically scroll hangs browser

1 Answer 131 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Greg
Top achievements
Rank 1
Greg asked on 23 Oct 2009, 04:51 PM
Hello-
I'm using Q2 2009 build with IE 8. I've got a RadGridView which is being bound to a list of objects. When the grid contains rows which are exceedingly tall due to long string content (a row being taller than the grid itself, maybe many times taller, and it seems to help if the tall row is not the 1st/last row in the grid), and the keyboard up/down buttons are used to vertically scroll, the iexplore.exe process pegs the CPU and either terminates or has to be killed. This is 100% reproducible both on my dev machine and in our test environment. I've tried handling the KeyDown event and setting e.Handled = true, but this code doesn't even get called before the browser crashes. The grid vertically scrolls fine when the mouse is used to drag the scroll bar.

Below are the grid XAML and the referenced template and styles (which live in app.xaml). Being able to scroll with keyboard isn't a concern, I just want to figure out how to prevent the application from having such an epic failure. If anyone has any ideas I'd appreciate it!

Thanks!

<telerikGridView:RadGridView x:Name="gridView_AuditHistory_Events"
VerticalAlignment="Stretch"
IsReadOnly="false"
AutoGenerateColumns="False"
ColumnsWidthMode="Fill"
RowIndicatorVisibility="Collapsed"
ShowGroupPanel="false"
IsFilteringAllowed="false"
IsEnabled="true"
Template="{StaticResource RadGridViewTemplate}"
RowStyle="{StaticResource GridViewRowStyle1}"
KeyDown="gridView_AuditHistory_Events_KeyDown"
>
<telerikGridView:RadGridView.Columns>
<telerikGridView:GridViewDataColumn HeaderText="TimeStamp" DataMemberPath="EventDateTime" Width="140" CellStyle="{StaticResource GridViewCellStyle1}"/>
<telerikGridView:GridViewDataColumn HeaderText="User Alias Causing Change" DataMemberPath="ContactAlias" Width="160" CellStyle="{StaticResource GridViewCellStyle1}"/>
<telerikGridView:GridViewDataColumn HeaderText="Event Type" DataMemberPath="EventName" Width="200" CellStyle="{StaticResource GridViewCellStyle1}"/>
<telerikGridView:GridViewDataColumn HeaderText="Additional Event Data" DataMemberPath="EventData" TextWrapping="Wrap" CellStyle="{StaticResource GridViewCellStyle1}"/>
</telerikGridView:RadGridView.Columns>
</telerikGridView:RadGridView>

<Color x:Key="GridViewRowInnerBorderBackground_AlternateColor">#FFF4F4F4</Color>
<SolidColorBrush x:Key="GridViewRowInnerBorderBackground_Alternate" Color="{StaticResource GridViewRowInnerBorderBackground_AlternateColor}"/>
<ControlTemplate x:Key="GridViewRowTemplate" TargetType="Telerik_Windows_Controls_GridView:GridViewRow">
<Grid x:Name="grid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="AlternateStates">
<VisualState x:Name="NonAlternate"/>
<VisualState x:Name="Alternate">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectionBackground" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridViewRowInnerBorderBackground_Alternate}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Unfocused">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="NavigatorIndicator" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Focused">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="NavigatorIndicator" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected"/>
</VisualStateGroup>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">

</VisualState>
<VisualState x:Name="Selected">

</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="ValueStates">
<VisualState x:Name="Valid">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="InvalidBorder" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Invalid">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="InvalidBorder" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="SelectionBackground" Margin="{TemplateBinding Margin}" MinHeight="{TemplateBinding MinHeight}" UseLayoutRounding="True" Grid.Column="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"/>
<Rectangle x:Name="BackgroundRectangle" Fill="{StaticResource GridViewRowSelectedBackground}" Opacity="0" Grid.Column="2"/>
<Telerik_Windows_Controls_GridView:IndicatorPresenter x:Name="PART_IndicatorPresenter" Background="{StaticResource GridViewRowIndicatorBackground}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" Visibility="{TemplateBinding RowIndicatorVisibility}" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" telerik:StyleManager.Theme="{StaticResource Theme}">
<Path x:Name="NavigatorIndicator" Fill="{StaticResource GridViewIndicatorsPartsFill}" Stretch="Fill" Height="8" HorizontalAlignment="Center" VerticalAlignment="Center" Width="5" Visibility="Collapsed" Data="M254.5,183.75 L254.5,193.33333 260.75,188.16682 z"/>
</Telerik_Windows_Controls_GridView:IndicatorPresenter>
<Telerik_Windows_Controls_GridView:IndentPresenter x:Name="PART_IndentPresenter" Background="{TemplateBinding Background}" Grid.Column="1" IndentLevel="{TemplateBinding IndentLevel}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
<Telerik_Windows_Controls_GridView:DataCellsPresenter x:Name="PART_DataCellsPresenter" Height="Auto" MinHeight="{TemplateBinding MinHeight}" Grid.Column="2" telerik:StyleManager.Theme="{StaticResource Theme}"/>
<Telerik_Windows_Controls_GridView:HorizontalScrollPanel x:Name="PART_DetailsScrollContainer" Grid.Column="2" Grid.Row="1" telerik:StyleManager.Theme="{StaticResource Theme}">
<Telerik_Windows_Controls_GridView:DetailsPresenter x:Name="PART_DetailsPresenter" Visibility="Collapsed" telerik:StyleManager.Theme="{StaticResource Theme}" DetailsProvider="{TemplateBinding DetailsProvider}"/>
</Telerik_Windows_Controls_GridView:HorizontalScrollPanel>
<Rectangle x:Name="InvalidBorder" Stroke="Red" StrokeThickness="2" Height="Auto" Margin="0" Width="Auto" Visibility="Collapsed" Grid.Column="0" Grid.ColumnSpan="3"/>
</Grid>
</ControlTemplate>
<Color x:Key="GridViewNormalBackgroundColor">#FFFFFFFF</Color>
<SolidColorBrush x:Key="GridViewRowNormalBackground" Color="{StaticResource GridViewNormalBackgroundColor}"/>
<Color x:Key="GridViewIndicatorBorderBrushColor">#FFB3B3B3</Color>
<SolidColorBrush x:Key="GridViewIndicatorBorderBrush" Color="{StaticResource GridViewIndicatorBorderBrushColor}"/>
<Color x:Key="GridViewForegroundColor">#FF000000</Color>
<SolidColorBrush x:Key="GridViewForeground" Color="{StaticResource GridViewForegroundColor}"/>
<Style x:Key="GridViewRowStyle1" TargetType="Telerik_Windows_Controls_GridView:GridViewRow">
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Template" Value="{StaticResource GridViewRowTemplate}"/>
<Setter Property="Background" Value="{StaticResource GridViewRowNormalBackground}"/>
<Setter Property="BorderBrush" Value="{StaticResource GridViewIndicatorBorderBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="MinHeight" Value="20"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="FontSize" Value="9"></Setter>
<Setter Property="Foreground" Value="{StaticResource GridViewForeground}"/>
</Style>

<Style x:Key="GridViewCellStyle1" TargetType="Telerik_Windows_Controls_GridView:GridViewCell">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Telerik_Windows_Controls_GridView:GridViewCell">
<Border x:Name="GridViewCellBorder"
BorderThickness="0,0,0,1"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}">
<Grid>
<Telerik_Windows_Controls_GridView:AlignmentContentPresenter x:Name="PART_ContentPresenter" TextAlignment="{TemplateBinding TextAlignment}" Visibility="Visible" Margin="{TemplateBinding Padding}" VerticalAlignment="Center" HorizontalAlignment="Stretch" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" TextWrapping="Wrap"/>
<ContentPresenter x:Name="PART_EditorPresenter" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="3,0,0,0"/>
<Rectangle Width="{TemplateBinding VerticalLineThickness}" Fill="{TemplateBinding VerticalLineFill}" HorizontalAlignment="Right" Visibility="{TemplateBinding VerticalLineVisibility}"/>
<Rectangle Width="Auto" Height="Auto" x:Name="therect" Margin="0" Visibility="Collapsed" Stroke="#FFFFAB3F" StrokeThickness="2" />
<Rectangle Width="Auto" Height="Auto" x:Name="CurrentBorder" Margin="2" Visibility="Collapsed" Stroke="#FF000000" StrokeThickness="0" StrokeDashOffset="0" StrokeDashCap="Square" StrokeDashArray="2"/>
</Grid>
<vsm:VisualStateManager.VisualStateGroups>
<vsm:VisualStateGroup x:Name="EditingStates">
<vsm:VisualState x:Name="Edited">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_EditorPresenter"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridViewCellBorder"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="#FFFCE9B7" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="therect"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CurrentBorder"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</vsm:VisualState>
<vsm:VisualState x:Name="Normal">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_EditorPresenter"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible" />
</ObjectAnimationUsingKeyFrames>

<ObjectAnimationUsingKeyFrames Storyboard.TargetName="therect"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CurrentBorder"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</vsm:VisualState>
<vsm:VisualState x:Name="Current">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_EditorPresenter"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="therect"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CurrentBorder"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<!--Cell background is set to red when a cell is current-->
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GridViewCellBorder"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Transparent" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</vsm:VisualState>
</vsm:VisualStateGroup>
</vsm:VisualStateManager.VisualStateGroups>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 27 Oct 2009, 08:34 AM
Hi Greg,

Unfortunately you are right, we were able to reproduce the problem using our Q2 2009 build.
I've also tried you scenario with the assemblies from our second Q3  beta (available for download under your client account and the good news are that everything was working fine on my end.
Please give it a try  and let us know how it goes.

P.S. The official Q3 release is expected in early November.


All the best,
Anastasia
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Greg
Top achievements
Rank 1
Answers by
Missing User
Share this question
or