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

[Solved] Expand All / Collapse all for a hierarchical grid

6 Answers 234 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.
Krishna Kishor Bhat
Top achievements
Rank 1
Krishna Kishor Bhat asked on 27 Oct 2009, 08:26 AM
Hi,

I m facing an error while trying to implement expand all / collapse all functionality for the Hierarchical Grids. The code for expand all / collapse all that I have written is

this.RadGridView.ExpandAllHierarchyItems(); // for expand
this.RadGridView.CollapseAllHierarchyItems(); // for collapse

I m writing this in the Click event of the Rad Navigation Button.

The error that I m getting is
{System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.RadNavigationButton.RadNavigationButton_Click(Object sender, RoutedEventArgs e)
   at System.Windows.RoutedEventHandler.Invoke(Object sender, RoutedEventArgs e)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)}

I m using the Q2 2009 SP1 Version 2009.2.812.1030

Thanks,
Krishna Bhat

6 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 27 Oct 2009, 08:31 AM
Hi Krishna,

Most probably this.RadGridView is null - can you check this?

Best wishes,
Vlad
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.
0
Krishna Kishor Bhat
Top achievements
Rank 1
answered on 27 Oct 2009, 09:14 AM
Hi Vlad,

Thanks for your reply. I have checked whether the RadGridView is null. It is not null.

Thanks,
Krishna Bhat
0
Krishna Kishor Bhat
Top achievements
Rank 1
answered on 27 Oct 2009, 02:57 PM
Hi Vlad,

Can you please look into this issue on higher priority.

Thanks
Krishna Bhat
0
Krishna Kishor Bhat
Top achievements
Rank 1
answered on 27 Oct 2009, 03:38 PM
Hi Vlad,

one more question, can you tell me which SP does the dll's version 2009.2.911.1030 belong to.
And if I want to get this version where do I download it from.

Thanks,
Krishna Bhat
0
Ivan
Telerik team
answered on 28 Oct 2009, 06:49 AM
Hi Krishna Kishor Bhat,

The problem can be reproduced if expand/collapse an hierarchy item in the RadNavigationButton click event. 
Using a standard Button control in the described scenario is working fine - see the attached example.

Please take a look at it.

Sincerely yours,
Ivan
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.
0
Krishna Kishor Bhat
Top achievements
Rank 1
answered on 28 Oct 2009, 08:57 AM
Thanks Ivan for the solution.


Regards,
Krishna Bhat
Tags
GridView
Asked by
Krishna Kishor Bhat
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Krishna Kishor Bhat
Top achievements
Rank 1
Ivan
Telerik team
Share this question
or