Hello Pasi,
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:
public
partial
class
Form1 : Form
{
public
Form1()
{
InitializeComponent();
this
.radGanttView1.MouseDown += RadGanttView1_MouseDown;
}
private
void
RadGanttView1_MouseDown(
object
sender, MouseEventArgs e)
{
RadElement el =
this
.GetElementAtPoint(
this
.radGanttView1,
this
.radGanttView1.RootElement, e.Location,
null
);
}
public
RadElement GetElementAtPoint(Control control, RadElement parent, Point point, List<RadElement> foundElements)
{
if
(parent.Visibility != ElementVisibility.Visible)
{
return
null
;
}
ChildrenListOptions childrenFlags = ChildrenListOptions.ZOrdered | ChildrenListOptions.ReverseOrder | ChildrenListOptions.IncludeOnlyVisible;
Rectangle client = control.ClientRectangle;
foreach
(RadElement element
in
parent.GetChildren(childrenFlags))
{
if
(element.ElementState != ElementState.Loaded)
{
continue
;
}
if
(element.HitTest(point))
{
bool
addElement = (foundElements !=
null
) && !(element
is
BorderPrimitive);
if
(addElement)
{
foundElements.Add(element);
}
RadElement res = GetElementAtPoint(control, element, point, foundElements);
if
(res !=
null
)
{
return
res;
}
if
(element.ShouldHandleMouseInput)
{
return
element;
}
}
}
return
null
;
}
}
I hope this helps. Please let me know if you need further assistance.
Regards,
Hristo
Progress Telerik