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

PushButtonClick VS CellButtonClick and currentcell

My first question is if I have a grid with a cell that has a push button, what is the difference between using PushButtonClick and CellButtonClick to trap the click event? Secondly, if I click on a PushButton in the cell before I click on an other cell and what the current row, it is not being set in the grid.CurrentCell.RowIndex. So if I click on row 3''s pushbutton, I get a -1 from grid.currentcell.rowindex. How can I fix this. I am using VB.net. Thanks Justin

2 Replies

AD Administrator Syncfusion Team January 7, 2004 08:36 PM UTC

CellButtonClicked is fired for any cell button (like a combobox button including a pushbutton). PushButtonClick is only fired for pushbuttons. This event is also fired when the spacebar is pressed if the pushbutton cell has focus. CellButtonClicked is not fired in this case. If you want to set the currentcell when a PushButton is clicked, you can handle the PushButtonClick event, and in your handler, call: this.gridControl1.CurrentCell.MoveTo(e.RowIndex, e.ColIndex);

JH Justin Holman January 8, 2004 11:45 AM UTC

Thank you. That worked.

Live Chat Icon For mobile
Up arrow icon