|104393||Jul 16,2012 12:33 PM UTC||Aug 1,2012 11:29 PM UTC||WPF||3|
Dear Syncfusion Support Team,
I added to the GridDataControl the ability to Drag and Drop the selected elements.
The problem is, if i select more than one elemt in the grid and then I drag the elements, only the draged element is selected and the other ones are deselected.
I think this depends one the event to select an element in the DataGrid. The selection changes if the left mouse button was pressed, in my case the selection should change if the left mouse button wsa clicked.
Is it possible to change the event for selecting an element in the DataGrid?
I attached a short Video and Code example.
Thank you for your update.
You can achieve your requirement by using the below code snippet,
DragGrid.Model.SelectionChanging += new GridSelectionChangingEventHandler(Model_SelectionChanging);
void Model_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
if (e.Reason == GridSelectionReason.MouseDown && (sender as GridDataTableModel).SelectedRanges.AnyRangeContains(e.ClickRange))
e.Cancel = true;
Please find the modified sample in the below location,
Please let us know if you have any queries.
Raja sekar .G
Thanks for the patience.
We have analyzed your query and we have modified the sample based as per your requirement and it can be download from the following location.
Sample Location: Sample.zip
Note: In this case if you start drag the SelectedRange by using mouse click along with ctrl key the selected range will appear correctly
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.