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

bug in ExpandableDataRecord

4 Answers 47 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 07 Mar 2009, 01:09 PM
Hi,

Executing following code recieved strange NullReferenceException:

        private void IterateRows(IList<Record> records)
        {
            foreach (Record record in records)
            {

                if (record is ExpandableDataRecord)
                {
                    ExpandableDataRecord expandableRecord = (ExpandableDataRecord)record;
                    expandableRecord.IsExpanded = true;

                    IterateRows(expandableRecord.ChildRecordManagers[0].Records);
                }
            }
        }

        private void Expand_Click(object sender, RoutedEventArgs e)
        {
            this.IterateRows(this.radGridView1.Records);
        }


System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Telerik.Windows.Controls.GridView"
  StackTrace:
       at Telerik.Windows.Controls.GridView.GridViewItemsControl.ExpandToAvailableSpace() in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\GridViewItemsControl.cs:line 1329
       at Telerik.Windows.Controls.GridView.GridViewItemsControl.GridViewItemsControl_Loaded(Object sender, RoutedEventArgs e) in r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\GridViewItemsControl.cs:line 852
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
       at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
       at MS.Internal.LoadedOrUnloadedOperation.DoWork()

Any thoughts?
Just to mention that I don't have r:\WPF_Scrum\WPF_Team\Sources\Development\WPF\GridView\GridView\GridViewItemsControl.cs on my computer ;)

Greg

4 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 10 Mar 2009, 04:44 PM

Hi g,

I couldn't reproduce the exception. Could you provide us with more information about your scenario? Do you have any custom styles or templates defined? How many levels of hierarchy do you have?
Even if we could not reproduce the exception our Q1 2009 release is just around the corner so this problem should not appear once you update.

Kind regards,

Milan
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
Greg
Top achievements
Rank 1
answered on 11 Mar 2009, 12:46 PM
Hi,

I'll check the scenario with 2009 Q1.

Btw when 2009 Q1 will be available for download and evaluation?

Greg.
0
Accepted
Vlad
Telerik team
answered on 12 Mar 2009, 04:48 PM
Hello Greg,

The release will be available for download today.

All the best,
Vlad
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
Greg
Top achievements
Rank 1
answered on 13 Mar 2009, 12:26 PM
Bug is fixed in 2009 Q1

Greg
Tags
GridView
Asked by
Greg
Top achievements
Rank 1
Answers by
Milan
Telerik team
Greg
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or