DataGrid and ContextMenu (CF 2)

F

Fred

Hello,

I have a DataGrid with a BindingSource and a ContextMenu.
I would like to change the Current property of the BindingSource before
the ContextMenu appears so that it matches the clicked row.
Is there a way to do this ?

Thanks for your help.
 
F

Fred

Dans : Fred disait :
Hello,

I have a DataGrid with a BindingSource and a ContextMenu.
I would like to change the Current property of the BindingSource
before the ContextMenu appears so that it matches the clicked row.
Is there a way to do this ?

No idea ? Or perhaps my question is not so clear ?
I explain another way to do, perhaps there is an easier solution to
succeed with this other method.
I tried to create the context menu in the MouseDown event (In this case,
I can change the selected row of my DataGrid using HitTestInfo.
In the MenuClick event I launch an action that hides the current Form
and open another one.
Unfortunatly, when the sub attached to the MenuClick event finishes, the
caption bar and the mainMenu of the hidden window appears again.
I mean that I have the expected form displayed but with the wrong
caption bar and menu. A simple click on the form client area is enough
to restore the right bar and menu.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top