I am working on a windows form app with a zedgraph and a datagridview. The datagridview has a row for every point in the line graph, and when the user clicks on a point in the graph I want it to highlight the equivalent row in the datagridview.
So how can I find out which point the user has clicked? (I don't need any code for datagridview part).
I figured it out. You can use
GraphPane.FindNearestObjectto find the point that was clicked.It seems that
nearestObjectisnullif you do not click a point and is of typeLineItemif you do, and thenindexwill tell you which point was clicked.