We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to bring up context menu while editing a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

13861 May 12,2004 02:36 PM UTC Jun 28,2004 06:48 PM UTC WinForms 6
loading
Tags: GridControl
Corinne Muir
Asked On May 12, 2004 02:36 PM UTC

Hi, we want to be able to duplicate the value for a cell for rest of the row when the user clicks a context menu option. This works if the cell already has data but if they want to do it in one step - enter the value and then duplicate across they have to click enter and then click back in that cell to activate the context menu. Is there a way to get the context menu to be active while editing a cell? Thanks, Corinne

Administrator [Syncfusion]
Replied On May 12, 2004 04:53 PM UTC

Here is a sample that should show context menus whether or not a cell is being edited.. It uses the grid_MouseUp event to handle all right clicks that the grid catches (which include the checkbox case), and dynamically hooks the cellcontrol_MouseUp in CurrentCellControlGotFocus and unhooks it in CurrentCellControlLostFocus. This allows us to catch the context menu for active cell controls.

Corinne Muir
Replied On May 27, 2004 02:39 PM UTC

How can we get the inline edit mode to complete - is there a call we can make? We need to know if the input is invalid before doing anything with it. Thanks, Corinne

Administrator [Syncfusion]
Replied On May 27, 2004 02:43 PM UTC

Try calling grid.CurrentCell.ConfirmChanges to see if that does what you need. If not, you can also try grid.CurrentCell.EndEdit. (If this is a GridDataBoundGrid, and you want to flush the changes to the data source, try also calling grid.Binder.EndEdit.)

Corinne Muir
Replied On May 27, 2004 05:34 PM UTC

Thanks again!

Corinne Muir
Replied On June 28, 2004 06:29 PM UTC

This sample was working fine until we click on a context menu choice that opens another dialog to set a value - the act of showing the dialog loses the focus of the current cell which causes both the dialog to be displayed and the context menu to be displayed with neither of them having focus or working. ideas? thanks, Corinne >Here is a sample that should show context menus whether or not a cell is being edited.. It uses the grid_MouseUp event to handle all right clicks that the grid catches (which include the checkbox case), and dynamically hooks the cellcontrol_MouseUp in CurrentCellControlGotFocus and unhooks it in CurrentCellControlLostFocus. This allows us to catch the context menu for active cell controls. > >

Administrator [Syncfusion]
Replied On June 28, 2004 06:48 PM UTC

Can you modify the sample above to show the problem? I added a MenuHandler and displayed a MessageBox from it, and it seemed to do OK for me.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;