Hi,
I've enabled my XamGrid with the following selection settings:
<ig:XamGrid.SelectionSettings> <ig:SelectionSettings CellSelection="None" CellClickAction="SelectRow" ColumnSelection="None" RowSelection="Multiple"/> </ig:XamGrid.SelectionSettings>
This is resulting in an unexpected side effect, where the grid now goes into multi-select mode whenever I click on a row in the grid, and as I move my mouse after the initial click, it just selects all the rows on the grid. Fortunately, using SHIFT and CTRL also lets me multi-select, but I *do not* want this click-drag selection featur. It's incredibly counter-intuitive, and does odd things when I overlay child windows over the grid window, for instance it keeps holding the selection and as I float my mouse over the child window (overlaying the grid window), the grid selection remains active.
Is there a way to disable this "feature"?
I figured out a hack fix, not very happy with it, since it's brute force and ugly to boot. If I preview the mouse move and force the release of the mouse capture, the click-and-drag selection problem goes away.
Sample code:
myXamGrid.PreviewMouseMove += MyHandler;
void MyHandler(object sender, MouseEventArgs e)
{
e.Handled = true;
(sender as XamGrid).ReleaseMouseCapture();
}
Please let me know if there is a more refined (i.e. elegant) answer!
I noticed the following information on the Infragistics website (http://help.infragistics.com/Help/Doc/WPF/2012.1/CLR4.0/html/xamGrid_Selection.html):
It states:
With multiple selection enabled, your end users can select multiple cells, columns or rows in the following way:
So in clarification to my original post, the question is, how can I disable the click-and-drag multiple continuous selection? It is totally unwanted for my application, and only confuses the users very badly.