c# - DeferRefresh is not allowed during an AddNew or EditItem transaction -


i have window containing 2 datagrids. , if click 1 specific column in first datagrid column of other datagrid, error

deferrefresh not allowed during addnew or edititem transaction

what going wrong here?

the first datagrid is

<datagrid x:name="firstdatagrid"           itemssource="{binding parts, mode=twoway}"           selecteditem="{binding selectedpart, mode=twoway}"           celleditending="datagrid_oncelleditending" >      <i:interaction.behaviors>           <views:scrollintoviewbehavior />      </i:interaction.behaviors>           <datagrid.resources>                <style targettype="{x:type datagridcell}">                    <eventsetter event="previewmouseleftbuttondown" handler="datagridcell_previewmouseleftbuttondown"></eventsetter>                </style>           </datagrid.resources>       <datagrid.columns>           <datagridtemplatecolumn>                     <datagridtemplatecolumn.celltemplate>                         <datatemplate>                             <itemscontrol itemssource="{binding identifications, mode=oneway}">                                 <itemscontrol.itemspanel>                                     <itemspaneltemplate>                                         <stackpanel orientation="horizontal"/>                                     </itemspaneltemplate>                                 </itemscontrol.itemspanel>                                 <itemscontrol.itemtemplate>                                     <datatemplate>                                         <textblock margin="5,0,0,0">                                             <hyperlink navigateuri="{binding articlenumber, mode=oneway}"                                                          command="{binding elementname=partdatagrid, path=datacontext.openidentificationcommand}" commandparameter="{binding}" >                                                                                     <textblock text="{binding articlenumber, mode=oneway}"/>                                             </hyperlink>                                         </textblock>                                     </datatemplate>                                 </itemscontrol.itemtemplate>                             </itemscontrol>                         </datatemplate>                     </datagridtemplatecolumn.celltemplate>                 </datagridtemplatecolumn>       </datagrid.columns> </datagrid> 

the second datagrid not matter since can click on column produce error.

solved myself.

the column causes problems read-only. why allow edit mode anyway? wrong. fixed adding

isreadonly="true" 

to wpf column definition.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -