wpf - how to handle DataGrid event in ViewModel class -


i trying handle datagrid event in viewmodel class. since there no command property in datagrid becomes tough handle events in datagrid. refered interaction.triggers ,but system.windows.interactivity.dll giving exception while building project. please me.

here 1 example in projects. use mvvm light version eventtocommand, system.windows.interactivity.dll should work too

  <datagrid itemssource="{binding myview}" autogeneratecolumns="false"               x:name="myprotokolllist"               isreadonly="true"                canuseraddrows="false" canuserdeleterows="false" canuserreordercolumns="true"               selectionmode="extended" selectionunit="fullrow"               selecteditem="{binding selectedrow, mode=oneway}"               issynchronizedwithcurrentitem="true">         <i:interaction.triggers>             <i:eventtrigger eventname="mousedoubleclick">                 <commanding:eventtocommand  command="{binding path=opencommand}"                                              commandparameter="{binding elementname=myprotokolllist, path=selecteditem}"/>             </i:eventtrigger>         </i:interaction.triggers> 

Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -