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. Image for the cookie policy date

GridGroupingControl and right mouse click

Hi, i have a problem with the TableControlCellClick Event of the GGC. I got a popupMenu opening when the right mouse button is clicked. I also got the current col and rowindex displayed in that popup. Now when I right click cell after cell the indexes don''t get updatet immediately. So all the work i''m performing in that event uses the old cell that i clicked before. How do i refer to the new clicked cell when still the old one is selected and used in the event ? I already tried the following function: PointToRowCol(new Point(e.Inner.MouseEventArgs.X, e.Inner.MouseEventArgs.Y), out row, out col); But the same problem here, with a click into the new cell still the one before is used in the event!

5 Replies

AD Administrator Syncfusion Team April 11, 2005 02:00 PM

If you want the currentcell to move when you right-click, try setting this.gridGroupingControl1.TableModel.Options.SelectCellsMouseButtonsMask = MouseButtons.Left | MouseButtons.Right;


AD Administrator Syncfusion Team April 12, 2005 06:36 AM

think I found the problem. When i use the PointToRowCol Function to determine the underlying Cell, the MouseCoordinates aren''t updated correctly. If I right-click row1 the TableControlCellMouseUp Event isn''t even triggered. I have to click a 2nd time to get this event fired. Then the mouse coordinates are in the right place and the right cell gets determined by the PointToRowCol Function. Now, if i move the mouse down the same column to another row and right-click again then the event is fired but the mousecoordinates are still pointing to the old cell. If i click a 2nd time here then the coordinates get updated correctly. Do you have any idea what the problem is ?


AD Administrator Syncfusion Team April 12, 2005 07:04 PM

Here is a sample that displays a context menu for cell sin a GridGroupingControl. There are two cases. One is a right-click on an inactive cell and the other is a right-click on an active cell. If you do not need this latter support, you do not have to handle the TableControlCurrentCellControlGotFocus and LostFocus. http://www.syncfusion.com/Support/user/uploads/GGC_BookMark_a879d961.zip


FB Felipe Bahiana Almeida September 28, 2015 12:35 PM

I am having a similar problem but I could not download the sample


AK Adhikesevan Kothandaraman Syncfusion Team September 29, 2015 08:22 PM

Hi Bahina,

Thanks for your update.

Due to some internal crash the link has been broken. Please brief your scenario, so that we can recreate the sample based on that.

Regards,
Adhi

Loader.
Live Chat Icon For mobile
Up arrow icon