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

1 posts, 0 answers
  1. Vincent
    Vincent avatar
    10 posts
    Member since:
    Nov 2013

    Posted 15 Jan 2014 Link to this post

    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.
Back to Top