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

Selecting row when RowDetailsVisiblityChanged is broken

3 Answers 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Susan Shaw
Top achievements
Rank 1
Susan Shaw asked on 14 Mar 2012, 04:37 PM
I'm attempting to upgrade my project to Q1 2012.  In my project, I want to select the row in the grid when the row details visiblity is changed.  I accomplished this with the following code
 

 

 

private void grdCustomer_RowDetailsVisibilityChanged(object sender, GridViewRowDetailsEventArgs e)

 

{

e.Row.CommitEdit();

e.Row.IsSelected =

 

true;

 

}

This works with Q1 2011, but with Q1 2012, I get the following error

"'NavigatorIndicatorBackground' name cannot be found in the name scope of 'System.Windows.Controls.Border'."

Is there something I need to change to make this work with Q1 2012, or is there a bug?  At this point, I will have to stay with Q1 2011 unless I can make this work with 2012.

3 Answers, 1 is accepted

Sort by
0
jholt
Top achievements
Rank 1
answered on 15 Mar 2012, 04:10 AM
Hi - I'm having exactly the same problem.

My code is just:
try
           {
               e.Row.IsSelected = e.Visibility.HasValue && e.Visibility.Value == Visibility.Visible;
           }
           catch (Exception exception)
           {
               Console.WriteLine(exception);
           }


It it helps, the stack trace is as follows:

A first chance exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll
System.InvalidOperationException: 'NavigatorIndicator' name cannot be found in the name scope of 'System.Windows.Controls.Border'.
   at System.Windows.Media.Animation.Storyboard.ResolveTargetName(String targetName, INameScope nameScope, DependencyObject element)
   at System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer)
   at System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer)
   at System.Windows.Media.Animation.Storyboard.BeginCommon(DependencyObject containingObject, INameScope nameScope, HandoffBehavior handoffBehavior, Boolean isControllable, Int64 layer)
   at System.Windows.VisualStateGroup.StartNewThenStopOld(FrameworkElement element, Storyboard[] newStoryboards)
   at System.Windows.VisualStateManager.GoToStateInternal(FrameworkElement control, FrameworkElement stateGroupsRoot, VisualStateGroup group, VisualState state, Boolean useTransitions)
   at System.Windows.VisualStateManager.GoToStateCommon(FrameworkElement control, FrameworkElement stateGroupsRoot, String stateName, Boolean useTransitions)
   at System.Windows.VisualStateManager.GoToState(FrameworkElement control, String stateName, Boolean useTransitions)
   at Telerik.Windows.Controls.GridView.GridVisualStates.GoToState(Control control, Boolean useTransitions, String[] stateNames) in c:\Builds\135\WPF_Scrum\Current_HotFix\Sources\Development\Controls\GridView\GridView\GridVisualStates.cs:line 20
   at Telerik.Windows.Controls.GridView.GridViewRow.ChangeVisualState(Boolean useTransitions) in c:\Builds\135\WPF_Scrum\Current_HotFix\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewRow.cs:line 1865
   at Telerik.Windows.Controls.GridView.GridViewRow.SelectionPropertyChanged(Object sender, DependencyPropertyChangedEventArgs rowSelectionArgs) in c:\Builds\135\WPF_Scrum\Current_HotFix\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewRow.cs:line 1124
   at Telerik.Windows.Controls.RadRowItem.OnSelectedPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) in c:\Builds\135\WPF_Scrum\Current_HotFix\Sources\Development\Core\Data\RadRowItem.cs:line 335
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.RadRowItem.set_IsSelected(Boolean value) in c:\Builds\135\WPF_Scrum\Current_HotFix\Sources\Development\Core\Data\RadRowItem.cs:line 234
   at Cornhouse.Views.Contracts.SingleContract.RelatedDetailsView.radGridContractDetail_OnRowDetailsVisibilityChanged(Object sender, GridViewRowDetailsEventArgs e) in C:\Visual Studio 2010\Mercurial\ParagonCh\trunk\Cornhouse\Views\Contracts\SingleContract\RelatedDetailsView.xaml.cs:line 40
0
Vera
Telerik team
answered on 15 Mar 2012, 03:39 PM
Hi,


Thank you for reporting this issue. It has been immediately fixed and the fix for it will be part of our next Internal Build (next week).


Greetings,
Vera
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
jholt
Top achievements
Rank 1
answered on 21 Mar 2012, 05:08 PM
Great - thanks.
Tags
GridView
Asked by
Susan Shaw
Top achievements
Rank 1
Answers by
jholt
Top achievements
Rank 1
Vera
Telerik team
Share this question
or