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

PushButtonClick VS CellButtonClick and currentcell

Thread ID:





9727 Jan 7,2004 05:55 PM UTC Jan 8,2004 11:45 AM UTC WinForms 2
Tags: GridControl
Justin Holman
Asked On January 7, 2004 05:55 PM UTC

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

Administrator [Syncfusion]
Replied On 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);

Justin Holman
Replied On January 8, 2004 11:45 AM UTC

Thank you. That worked.


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