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

CellButtons not working

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.

4 Replies

AD Administrator Syncfusion Team 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.

AD Administrator Syncfusion Team May 28, 2004 02:28 PM UTC

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

AD Administrator Syncfusion Team 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); }

AD Administrator Syncfusion Team May 31, 2004 10:39 AM UTC

Thank you.. it works very well.

Live Chat Icon For mobile
Up arrow icon