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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CellButtons not working

Thread ID:





14545 May 28,2004 12:48 PM UTC May 31,2004 10:39 AM UTC WinForms 4
Tags: GridControl
Administrator [Syncfusion]
Asked On May 28, 2004 12:48 PM UTC

Hi, I followed the CellButtons example and implemented the same thing, I added the CurrentCellActivating handler into my form and prevent the user from editing cell(1,1). i.e if (e.ColIndex == 1 && e.RowIndex == 1) e.Cancel = true; When I single clicks onto cell(1,1), I can still see the highlighted cell when I drag the button. However, when I double clicked into cell(1,1), I am unable to see the highlighted cell when I drag the buttons. I also tired this with the CellButtons sample project, I see the same thing.

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

Instead of cancelling CurrentCellActivating to prevent a user from editing a cell, try handling the CurrentCellStartEditing, and cancel that event. That is more likely not to interfere with the cell buttons.

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

I tried both already, they seems to behave the same.

Administrator [Syncfusion]
Replied On May 28, 2004 07:16 PM UTC

I can see the problem you described in the sample even without handling CurrentCellActivating. I was able to avoid it by handling the grid.DoubleClick event faking a mouseclick to reset teh mouse controller that is getting out of sync with the double click in this celltype. You might want to conditionally do the fake click based on if the currentcell is one of these button cells. private void gridControl1_DoubleClick(object sender, System.EventArgs e) { Point p = this.gridControl1.PointToClient(Control.MousePosition); ActiveXSnapshot.FakeLeftMouseClick(this.gridControl1, p); }

Administrator [Syncfusion]
Replied On May 31, 2004 10:39 AM UTC

Thank you.. it works very well.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon