Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
UltraDataChart: right-click context menu on series
posted

Thanks to Andrew Goldenbaum, we've been experimenting with the UltraDataCharts and had some early success.  

Regarding the subject of my post...

I'd like to have the ability to provide a right-click context menu against the chart's series plotted graph point, and with this, provide the user with the ability to see extra information.  I've currently wired our graphs to respond to their SeriesMouseLeftButtonDown event as a test to see if I could get the data that makes up the point clicked, and this has worked.  

As a little context....we use a Progress Openedge Database, and unlike having the ability to map a progress dataset directly to a grid using a binding source, I convert chunks of the progress dataset to system dataset and tables and then wire this construct against the graphs.  It works, but it'd be nice to have the ability similar to that offered by the grid.

I see where you can hook an UDC to a context menu, but was hoping for possible thoughts/examples on how I could make that context menu only available upon clicking on the series data points, like we've been able to trapping the mentioned event above. 

An example of my existing coding trapping this event.

Appreciate the assistance and time. 

Parents
  • 34430
    Verified Answer
    Offline posted

    Hello Randy,

    I have been investigating into the behavior you are looking to achieve, and I would recommend that you utilize the SeriesMouseRightButtonDown event in this case, and assign the ContextMenu to the UltraDataChart there. The ContextMenu will open on an internal handling of MouseUp, so this will allow you to create the ContextMenu, assign it, and have it shown.

    I would also recommend that when you create the ContextMenu, you hook into the Collapse event of the menu so that you can set the UltraDataChart.ContextMenu to null at that point. This will ensure that you do not get a context menu unless you right-click a series.

    I am attaching a sample project to demonstrate this.

    Please let me know if you have any other questions or concerns on this matter.UltraDataChartSeriesContextMenu.zip

Reply Children
No Data