c# - WPF DataGrid begin editing on Double Click not Single Click -
i have wpf datagrid text columns editable. able drag-drop them , place them in different view.
unfortunately, if row has selection , try drag it, enters edition mode instead... rather enter edition mode on double click, single click on row can used start drag.
currently, work around never select row before dragging it
i saw couple of similar questions, none addressing problem.
// theres million ways i'd rather public class doubleclickeditdatagrid : datagrid { protected override void oncanexecutebeginedit(canexecuteroutedeventargs e) { if (e.parameter mousebuttoneventargs) { if ((e.parameter mousebuttoneventargs).clickcount <= 1) { e.canexecute = false; return; } } base.oncanexecutebeginedit(e); } }
Comments
Post a Comment