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.
Best regards,
Michael
Hi Kramer,
Thank you for your update.
You can achieve your requirement by using the below code snippet,
Code Snippet[C#]:
|
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,
Sample: ModifiedSample.zip
Please let us know if you have any queries.
Thanks,
Raja sekar .G
Hi Kramer,
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
Thanks,
Raja sekar.G