Hi I am having an issue with column resizing when the drag and drop is enabled on xamDataGrid.
Basically if i don't select a record, resizing columns will be working fine. But if i select a record (ActiveRecord != null) and then do a column resizing, drag and drop will be performed prior to resizing.
I noticed that
PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
and PreviewMouseDown(....)
will not be able to catch the left button click on the column vertical lines.
How can I resolve this? Thanks.
As far as I was able to debug this, if you handle the PreviewMouseLeftButtonDown event of the window, this will be able to pick up the grid splitter's press - it will resolve in e.OriginalSource being a Border. Then you can set some flag which you can use in the mouse down event of the XamDataGrid. I cannot think of another way around this right now.
However, you can use this approach here - by Josh Smith, modified by me to work with the XDG. It handles this scenario smoothly:
http://blogs.infragistics.com/blogs/alex_fidanov/archive/2010/03/23/josh-smith-s-listviewdragdropmanager-for-xamdatagrid.aspx
can anybody give me some feedback on this? it's pretty urgent.... thanks.