2

So i've got my command working, except for the fact that I'm not getting the DataGridCellEditEndingEventArgs 'e' passed down to me... this is my xaml in the datagrid

                                    <i:Interaction.Triggers>
                                        <i:EventTrigger EventName="CellEditEnding">
                                            <i:InvokeCommandAction Command="{Binding RelativeSource=
                    {RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.MainWindowViewModel.ObjDataGrid_CellEditEnding}"/>
                                        </i:EventTrigger>
                                    </i:Interaction.Triggers>

And my test command

    private ICommand objDataGridCellEditEnding;
    public ICommand ObjDataGrid_CellEditEnding
    {
        get
        {
            if (objDataGridCellEditEnding== null)
            {
                objDataGridCellEditEnding= new RelayCommand(CellEditEndingTest);
            }
            return objDataGridCellEditEnding;
        }
    }

    private void CellEditEndingTest(object param)
    {

    }

param is always null.... and I don't know why...

Any help would be appreciated...

Where e is needed

        if (e.EditAction == DataGridEditAction.Commit)
        {
            TextBox cellTextEdit = e.EditingElement as TextBox;
uaswpf
  • 137
  • 7

0 Answers0