or
Hi,
we are using GridView.ToHtml method for Export grid's records.
Depending on records count, we get a System.OutOfMemoryException in this method. (>10000 records throw exception)
We are using 'RadControls for WPF Q2 2009' version.
Are there anyway to improve performance or to avoid this exception?
Best regards!
public static readonly DependencyProperty VisibilityProperty = DependencyProperty.Register("Visibility", typeof(bool), typeof(HideRadGridViewColumnBehavior), new PropertyMetadata(OnVisibilityPropertyChanged));private static void OnVisibilityPropertyChanged(DependencyObject target, DependencyPropertyChangedEventArgs args){ if (((HideRadGridViewColumnBehavior)target).AssociatedObject == null) { MessageBox.Show("AssociatedObject is null"); } else { var col = ((HideRadGridViewColumnBehavior)target).AssociatedObject as GridViewDataColumn; col.Width = 0; col.Header = ""; col.IsResizable = false; }}AssociatedObject is null, Here is the XAML I am using - hopefully someone can point me in the right direction on this. <telerik:GridViewDataColumn DataMemberBinding="{Binding ModelId}" Header="ID"> <i:Interaction.Behaviors> <b:HideRadGridViewColumnBehavior Visibility="{Binding Path=DevMode}"/> </i:Interaction.Behaviors></telerik:GridViewDataColumn>tvDirectory.Items.Add("Select/Deselect All");RadTreeViewItem item = (RadTreeViewItem)((RadTreeView)sender).SelectedContainer;if (item != null){ if (item.CheckState == ToggleState.On) { foreach (RadTreeViewItem tvItem in tvDirectory.Items) { tvItem.CheckState = ToggleState.On; } } else { foreach (RadTreeViewItem tvItem in tvDirectory.Items) { tvItem.CheckState = ToggleState.Off; } }}