The ScrollViewer.HorizontalScrollBarVisibility and ScrollViewer.VerticalScrollBarVisibility properties crash my application when set on the RadGridView with a System.OutOfMemoryException (see below):
System.OutOfMemoryException was unhandled
Message: An unhandled exception of type 'System.OutOfMemoryException' occurred in Unknown Module.
I've isolated the problem down to this. If I remove the scrollbar settings then the page loads fine, but with these unsightly gray bars on both the side and bottom of the control.
System.OutOfMemoryException was unhandled
Message: An unhandled exception of type 'System.OutOfMemoryException' occurred in Unknown Module.
I've isolated the problem down to this. If I remove the scrollbar settings then the page loads fine, but with these unsightly gray bars on both the side and bottom of the control.
3 Answers, 1 is accepted
0
Hi Alex Solonenko,
We are using custom scrollViewer so we don't use these properties. But you should not get such exception. I've made simple project that sets these properties and it is working.
Can you send us small project demonstrating this problem? This way we will be able to find and fix it.
Also which version of our assemblies are you using? And last did you run this on Silverlight 2 or Silverlight 3?
Waiting for your response.
Kind regards,
Hristo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
We are using custom scrollViewer so we don't use these properties. But you should not get such exception. I've made simple project that sets these properties and it is working.
Can you send us small project demonstrating this problem? This way we will be able to find and fix it.
Also which version of our assemblies are you using? And last did you run this on Silverlight 2 or Silverlight 3?
Waiting for your response.
Kind regards,
Hristo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Richard
Top achievements
Rank 1
answered on 28 Jul 2009, 03:56 PM
I'm using the "SL3 for Developers" client with the 2009.1.526.1020 assemblies.
Here's an example of what I was using when the error was thrown.
Furthermore, I'll have you know that we had to switch to the built-in DataGrid to resolve the issue until later. At least the built-in DataGrid had the following properties...
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"
I would suggest the same properties for the RadGridView control.
Thanks.
Here's an example of what I was using when the error was thrown.
<grid:RadGridView CanUserInsertRows="False" CanUserReorderColumns="False" ActionOnLostFocus="None"
ShowGroupPanel="False" IsReadOnly="True" RowIndicatorVisibility="Collapsed"
AutoGenerateColumns="False" ColumnsWidthMode="Fill" CanUserFreezeColumns="False"
ItemsSource="{Binding Children}" Margin="2,1,2,10" FontFamily="{StaticResource CondensedFontFamily}"
FontSize="14" Loaded="RadGridView_Loaded"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden">
<grid:RadGridView.Columns>
<grid:GridViewColumn HeaderText="Report Name" Width="*" HeaderTextAlignment="Center">
<grid:GridViewColumn.CellStyle>
<Style TargetType="gridView:GridViewCell">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="gridView:GridViewCell">
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<Rectangle Width="10" Height="4" Fill="#FF384351" Stroke="#FF8997A4" Visibility="{Binding IndentVisibility}" Margin="5,0,5,0"/>
<HyperlinkButton Content="{Binding Title}" NavigateUri="{Binding NavigateUrl}" Foreground="#FF384351" TargetName="_blank" FontWeight="{Binding Bold}" FontFamily="{StaticResource CondensedFontFamily}"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</grid:GridViewColumn.CellStyle>
</grid:GridViewColumn>
<grid:GridViewDataColumn HeaderText="Last Generated" DataMemberBinding="{Binding LastGenerated}"
IsFilterable="False" IsSortable="False" Width="140" HeaderTextAlignment="Center"/>
<grid:GridViewColumn HeaderText="Actions" Width="55" HeaderTextAlignment="Center">
<grid:GridViewColumn.CellStyle>
<Style TargetType="gridView:GridViewCell">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="gridView:GridViewCell">
<Button Style="{Binding ScheduleButtonStyle}" Click="ScheduleButton_Click"
Width="20" Height="20"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</grid:GridViewColumn.CellStyle>
</grid:GridViewColumn>
</grid:RadGridView.Columns>
</grid:RadGridView>
ShowGroupPanel="False" IsReadOnly="True" RowIndicatorVisibility="Collapsed"
AutoGenerateColumns="False" ColumnsWidthMode="Fill" CanUserFreezeColumns="False"
ItemsSource="{Binding Children}" Margin="2,1,2,10" FontFamily="{StaticResource CondensedFontFamily}"
FontSize="14" Loaded="RadGridView_Loaded"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Hidden">
<grid:RadGridView.Columns>
<grid:GridViewColumn HeaderText="Report Name" Width="*" HeaderTextAlignment="Center">
<grid:GridViewColumn.CellStyle>
<Style TargetType="gridView:GridViewCell">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="gridView:GridViewCell">
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
<Rectangle Width="10" Height="4" Fill="#FF384351" Stroke="#FF8997A4" Visibility="{Binding IndentVisibility}" Margin="5,0,5,0"/>
<HyperlinkButton Content="{Binding Title}" NavigateUri="{Binding NavigateUrl}" Foreground="#FF384351" TargetName="_blank" FontWeight="{Binding Bold}" FontFamily="{StaticResource CondensedFontFamily}"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</grid:GridViewColumn.CellStyle>
</grid:GridViewColumn>
<grid:GridViewDataColumn HeaderText="Last Generated" DataMemberBinding="{Binding LastGenerated}"
IsFilterable="False" IsSortable="False" Width="140" HeaderTextAlignment="Center"/>
<grid:GridViewColumn HeaderText="Actions" Width="55" HeaderTextAlignment="Center">
<grid:GridViewColumn.CellStyle>
<Style TargetType="gridView:GridViewCell">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="gridView:GridViewCell">
<Button Style="{Binding ScheduleButtonStyle}" Click="ScheduleButton_Click"
Width="20" Height="20"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</grid:GridViewColumn.CellStyle>
</grid:GridViewColumn>
</grid:RadGridView.Columns>
</grid:RadGridView>
Furthermore, I'll have you know that we had to switch to the built-in DataGrid to resolve the issue until later. At least the built-in DataGrid had the following properties...
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"
I would suggest the same properties for the RadGridView control.
Thanks.
0
Hi Alex Solonenko,
I've created your test case using 2009.1 526 build of RadControls and using Silverlight 3 Developer runtime.
There are no exceptions. I'm attaching the project.
Could you let me know if this is your test case and if not please send simple project so I can investigate this further (in order to send files you should open support ticket).
Best wishes,
Hristo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I've created your test case using 2009.1 526 build of RadControls and using Silverlight 3 Developer runtime.
There are no exceptions. I'm attaching the project.
Could you let me know if this is your test case and if not please send simple project so I can investigate this further (in order to send files you should open support ticket).
Best wishes,
Hristo
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.