473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

WinForm: Drag & Drop is blocked

1
I have a Winform with a DevExpress.ExtraGrid and a User Control of .Net. that contains a Grid as well.
When I try to Drag & Drop from the Grid onto the UserControl, once the mouse is on the UserControl I see a Blocked Icon (black circle with line over it) like it's disabled or something.
I made sure the 'AllowDrop' property is true in both grids. It seems I can't in any case catch the event of MouseUp once I reached the UserControl and start seeing the blocked Icon.
Any idea why? Will appreciate any help!
Nov 26 '14 #1
2 2190
Frinavale
9,735 Expert Mod 8TB
There should be a DragEnter Event that you can handle and specify the "Effect" that is used.

This way you can check the type of the thing being dragged onto the page and if it is allowed you can set the DragDropEffects to All, or if it is not allowed you can set it to None (which is what you are seeing right now)

-Frinny
Nov 26 '14 #2
You can handle the PreviewMouseUp event to catch the moment when the user clicks on a column header:

[C#]
Expand|Select|Wrap|Line Numbers
  1. private void view_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) {
  2.     TableViewHitInfo info = view.CalcHitInfo((DependencyObject)e.OriginalSource);
  3.     if (info.InColumnHeader) {
  4.         MessageBox.Show(info.Column.FieldName);
  5.     }
  6. }
1
solution
MouseUp event not firing.
Tags:
.NET, WPF, DXGrid for WPF 0
Victoryking
3 years ago MouseUp event is not firing. we need this for sorting. I read from other post that this is by design and we should use GridControl.CustomColumnSort Event. Our Application architecture is different. A legacy delphi component does sorting of the records. so, I need a proper event to call the sorting methods and re-bind the new data? Also, I need to AllowMove for columns.


any comments?
Show all comments
Dmitry (DevExpress Support)
3 years ago >>Also, I need to AllowMove for columns.
I'm afraid that your requirements are not clear to me. We kindly ask you to create a new ticket regarding this second problem in order not to mix discussions devoted to different subjects in one ticket and avoid misunderstanding. Please describe the problem that you have encountered and the task you wish to implement in greater detail and we will do our best to find an appropriate solution.
Show all comments
Leave a Comment You must log in or register to leave comments 1 Solution0
Dmitry (DevExpress Support)
3 years ago You can handle the PreviewMouseUp event to catch the moment when the user clicks on a column header:
[C#]Open in popup window
Expand|Select|Wrap|Line Numbers
  1. private void view_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) {
  2.     TableViewHitInfo info = view.CalcHitInfo((DependencyObject)e.OriginalSource);
  3.     if (info.InColumnHeader) {
  4.         MessageBox.Show(info.Column.FieldName);
  5.     }
  6. }
This event is raised before the MouseUp and can be handled at the TableView's level.
Nov 26 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: srikanth | last post by:
Hi all, I have an requirement in one of my projects. We have one aspx page, in that we have two frames, in each frame having a tree structure control(dynamic data). In the left Frame we are...
1
by: Karsten Schramm | last post by:
Hi, if I drag an Outlook.MailItem to a Windows-Explorer window a <subject>.msg file will be created. Now I try to drag & drop a mail item to my own WinForm app. Unfortunately it doesn't work....
1
by: Ed Sutton | last post by:
I am looking for a WinForms drag and drop example that shows how to implement dragging from a WinForm treeView and dropping on another application. I have drag & drop working from within the...
2
by: Grey | last post by:
I need to design a workflow application with C#. I want to design an UI with some workflow components which they can be drag & drop anywhere in order to design the workflow for the application...
2
by: Ivo Tcholakov | last post by:
Is it possible to drag and drop controls in an aspx page at runtime ? Meaning i have developed a ASP.NET web form, the web form is now downloaded in IE - now can i have this form to detect mouse...
3
by: Goldwind | last post by:
Hi, I"m trying to use drag & drop of text from one text box to another but without suceess. Microsoft presented an example in "101 code samples" BUT in this example the code select and drag all...
3
by: VB Programmer | last post by:
In VB.NET 2005 (winform) any sample code to drag & drop items between 2 listboxes? Thanks!
1
by: Sim | last post by:
Hello NG, I try to use drag and drop function between two list views. For this I found following code: ...
5
by: Romulo NF | last post by:
Greetings, I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with...
1
by: patrickq | last post by:
What am trying to achieve is dragging an element from one IFRAME/FRAME into another IFRAME/FRAME. But upon dropping the element, I do not want the target IFRAME/FRAME to open/load it. I want to set...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.