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

GridView.FindName does not work with Type Of System.Windows.Interactivity.InvokeCommandAction

0 Answers 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vincent
Top achievements
Rank 1
Vincent asked on 15 Jan 2014, 10:21 AM
Hi, this is my Xaml for my RadGridView,
To use double click, i had to use i:Interaction.Triggers...

<telerik:RadGridView  x:Name="GridViewList"
ItemsSource="{Binding LstResidantSecuriteSociale, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelectedResidentSecuriteSociale, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
SelectionMode="Single"
AutoGenerateColumns="False"
GroupRenderMode="Flat"
BorderBrush="White"                              
ShowGroupPanel="False"
FrozenColumnsSplitterVisibility="Collapsed"
RowIndicatorVisibility="Collapsed"
IsReadOnly="True"
Height="auto">
 
<i:Interaction.Triggers>
    <i:EventTrigger EventName="MouseDoubleClick">
        <i:InvokeCommandAction x:Name="CommandeMouseDoubleClick" Command="{Binding Path=DataContext.CustomCommandModifierLigne, RelativeSource={RelativeSource FindAncestor, AncestorType=telerik:RadGridView}, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
   </i:EventTrigger>
</i:Interaction.Triggers>
 
   <telerik:RadGridView.Columns>
                        
  </telerik:RadGridView.Columns>
                     
</telerik:RadGridView>

 i want to find the invokeCommandAction and set property IsEnabled to false;

//Works in WPF, not with silverlight
 
System.Windows.Interactivity.InvokeCommandAction Commande = (System.Windows.Interactivity.InvokeCommandAction)radGridView.FindName("CommandeMouseDoubleClick");
//In Silverlight Commande = null;
 
Commande.IsEnabled = false;

Thx a lot for help!
Regards, Vincent.
Tags
General Discussions
Asked by
Vincent
Top achievements
Rank 1
Share this question
or