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

close edit mode after change is propagated to viewmodel

0 Answers 27 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lukasz
Top achievements
Rank 1
Lukasz asked on 27 Feb 2017, 03:15 PM

Hi,

I have GridViewDataColumn with a edit template containing a com:

<telerik:RadButton
    Command="{Binding DoSomethingCommand}"
    Focusable="False"
</telerik:RadButton>

 

My button command calls a command hander "MyViewModel.OnDoSomething" method in ViewModel attached to RadGridView row, but I am unable to figure out how to close edit mode after my handler is called. I tried to call CommitEdit() from Click() handler attached to button above. After adding click handler my "MyViewModel.OnDoSomething" is not called anymore.

I could fire new event from MyViewModel.OnDoSomething and intercept this event in View and call CommitEdit from there, but maybe there is a simpler way?

 

Thanks,

Ɓukasz

 

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Lukasz
Top achievements
Rank 1
Share this question
or