I am quite new to UI programming (and Telerik components) and thus have a question about double clicking. The problem is as follows.
We have a need to start some handling when user double clicks on an item. This should happen from either side of the gantt view, from the grid or timeline side.
My current implementation is such that I subscribe for radGanttView DoubleClick-event. In the event handler I check from radGanttView SelectedItem-property which item was double clicked. The problem here is that if the item is already selected, user can double click anywhere and my code will be run.
So the question is as follows. Is there a way to receive a double click only if user clicks on the UI element of the task? It seems that GanttGraphicalViewBaseTaskElement has a doubleclick-event but I don't know how to get my hands on such object. Or should this be done somehow differently?
Telerik UI for Winforms R2 2017
7 Answers, 1 is accepted
Thank you for writing.
Here is a sample code snippet demonstrating how to detect double clicking over GanttViewTaskElement in the graphical view:
I hope this information helps. Should you have further questions I would be glad to help.
Hello Dess and thank you for the quick reply.
I tried this out but I'm getting the following exception: System.Reflection.AmbiguousMatchException: Ambiguous match found.
My code is as follows.
Any ideas what could cause this and is there something I could do differently?
Thank you for writing back.
I have attached my sample C# project where everything works as expected. If you are experiencing any difficulties with ABL and the OpenEdge environment feel free to submit your case in Salesforce by using the following link: https://progresslink.progress.com/
Thus the OpenEdge support will gladly assist you.
I hope this information helps. If you have any additional questions, please let me know.
Once again, thank you for the quick reply Dess! I will continue through Salesforce.
Hello again Dess!
It seems that there is a problem with call to GetElementAtPoint when using the libraries from Progress.
Before we get a fix for this, is there any other way to implement the check for what was double clicked? (And we would need it for both sides, for the grid and timeline.) Or should we just stick to the current implementation until we get the fix?
Thank you again for the help.
Thank you for writing.
Indeed OpenEdge has an issue with generic methods and until this gets resolved you will not be able to use the built-in implementation. You can perform the same check this way:
I hope this helps. Please let me know if you need further assistance.
Hello Hristo! Thank you for the example and help with the issue! I got this working now as required.