WPF DataGrid 'Select All Button' followed by Control-C -
right after loading wpf datagrid, hit 'select button' (upper left hand corner) followed control-c.
but sequence not copy datagrid items clipboard.
how can make work?
it seems data grid not focus when button clicked, have fix yourself:
datagrid.commandbindings.add(new commandbinding(applicationcommands.selectall, ondatagridselectall));
and then:
private void ondatagridselectall(object sender, executedroutedeventargs e) { var grid = (datagrid)sender; grid.focus(); grid.selectall(); }
you can add command binding in xaml if want so.
Comments
Post a Comment