wpf - Checkbox with Catel EventToCommand not working in Datagrid -


i have following xaml:

<datagrid.columns> </datatemplate> </datagridtemplatecolumn.headertemplate> <datagridtemplatecolumn.celltemplate>    <datatemplate>       <checkbox ischecked="{binding isselected, mode=twoway}"          command="{binding datacontext.updatecommand, relativesource={relativesource mode=self}}">       </checkbox>    </datatemplate> </datagridtemplatecolumn.celltemplate> </datagridtemplatecolumn> 

in viewmodels have;

public command updatecommand { get; private set; } updatecommand = new command(updatecontrols);  private void updatecontrols() {     //execute } 

however, updatecontrols never executed. can me working ?

the problem binding (which checkbox). should give datagrid name , use binding:

<checkbox ischecked="{binding isselected, mode=twoway}"           command="{binding elementname=mydatagrid, path=datacontext.updatecommand}" /> 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -