PC Review


Reply
Thread Tools Rate Thread

DataGrid and ContextMenu (CF 2)

 
 
Fred
Guest
Posts: n/a
 
      10th Nov 2007
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.

--
Fred
http://www.cerber mail.com/?3kA6ftaCvT (enlever l'espace)

 
Reply With Quote
 
 
 
 
Fred
Guest
Posts: n/a
 
      14th Nov 2007
Dans : news:(E-Mail Removed),
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.

--
Fred
http://www.cerber mail.com/?3kA6ftaCvT (enlever l'espace)

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid and ContextMenu problems news.tpi.pl Microsoft C# .NET 0 29th Jul 2005 08:38 AM
Datagrid & contextMenu MDB Microsoft Dot NET Compact Framework 2 27th Dec 2004 07:09 PM
contextMenu & Datagrid MDB Microsoft C# .NET 1 23rd Dec 2004 03:43 PM
Is it possible to add ContextMenu items to the Standard TextBox ContextMenu??? =?Utf-8?B?TWlrZSBpbiBQYXJhZGlzZQ==?= Microsoft Dot NET Framework Forms 1 15th Mar 2004 07:54 AM
DataGrid Cell ContextMenu David Elliott Microsoft Dot NET Framework Forms 0 28th Aug 2003 04:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:03 PM.