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

Context Menu causing fatal error in v3.2.1.0

Thread ID:





29942 Jun 7,2005 10:32 PM UTC Jun 9,2005 12:15 AM UTC WinForms 6
Tags: GridControl
Felix DeHerrera
Asked On June 7, 2005 10:32 PM UTC

Hi All, I''m using a GridControl (bound or unbound doesn''t matter) and assigning a syncfusion context menu to the grid via the grids property page. Launch the app (no code under form), select a cell in the grid, and then right-click... viola, the application hangs, no popup menu. Select another cell and still locked up. This is trapped as a fatal error in our production app. Anybody know why this happens and how i might get around it?... until then, no context menus. ... bummer. Developing in VB.Net. So much for a smooth upgrade.. Thanks

Administrator [Syncfusion]
Replied On June 7, 2005 11:30 PM UTC

I drop a GridControl on a Form and added popup menu. It does not lock up for me. http://www.syncfusion.com/Support/user/uploads/GC_Context_e1e8c7ad.zip Some things to check. Make sure you are using the versions of all the dlls. Open up the references node in the solution explorer and click eack syncfusion reference and check its version number in the property grid. Also try running your application in the debugger with it set to break on exception. Are their any exceptions being thown as you try your code?

Felix DeHerrera
Replied On June 8, 2005 12:43 AM UTC

Hi Clay, I ran your sample. Left-clicked into a cell on the grid - it appeared to be ready to edit - then I immediately Right-clicked... nothing. then I left-clicked into another cell. Got a (not responding) addition to the title bar and the sample app was locked up. I did have to run the license app that appeared automatically. --- Ok, after you select the cell, you have to right-click in that same cell being edited. This will cause the failure. --- Hope this helps.

Administrator [Syncfusion]
Replied On June 8, 2005 08:50 AM UTC

Thank you explaining how to see the problem. When there is an actively editing cell, it is not the grid who gets the right-click, but the cell control that gets it. So, in this situation in teh sample, it is the embedded GridTextBoxControl (derived from RichTextBox) and RichTextBox does not have a contextmenu assoicated with it, an dthis is why you see this problem. If you do not want to see the menu on activel editing cells, you can add code like this is formload, to avoid this problem for default cell type, "TextBox". CType(Me.GridControl1.CellRenderers("TextBox"), GridTextBoxCellRenderer).TextBox.ContextMenu = New ContextMenu This will allow the right-click to be ignored on an actively editing TextBox. If you want to see the same context menu on all active editing TextBox cells, then you can add this code in Form.Load. Me.PopupMenusManager1.SetXPContextMenu(CType(Me.GridControl1.CellRenderers("TextBox"), GridTextBoxCellRenderer).TextBox, Me.PopupMenu1) If you want the context menus to vary from cell to cell on actively editing cells, then you will have to handle CurrentCellGotFocus and CurrentCellLostFocus, and dynamically provide/remove the desired context menu. Here is a forum thread that has a sample. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=14267

Felix DeHerrera
Replied On June 8, 2005 04:15 PM UTC

Thank You Clay!! your suggested workarounds handled the problem flawlessly. I do think that this is a bug though, as my application should not lock up under the described circumstances. I''m sure you guys will take care of it. Great Day to you! and thanks for the quick response. Felix

Administrator [Syncfusion]
Replied On June 8, 2005 05:29 PM UTC

Hi Clay, We also see this lock up problem in our app after we upgraded from version to The app used to work fine with the context menu when we were using Now I have to add your suggested workaround to resolve the problem. There is another minor problem after the workaround, sometimes the context menu does not pop up at the right position. It pops up on the top-left corner of the screen. The problem does not happen every time you click a cell, but it does happen. Is there a way to avoid it to happen? Thanks Dongxian Li

Administrator [Syncfusion]
Replied On June 9, 2005 12:15 AM UTC

Are you using a Windows Forms Context menu or syncfusion popup menu? Normally, when a window pops up in the upper left corner, it menus that the window was not parented properly. If you can upload a sample showing this problem, we can try to debug it here.


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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