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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When handling TableControlCurrentCellValidating event, TableControlMouseDown is being first

Thread ID:





62316 Jun 12,2007 11:47 PM UTC Jun 13,2007 06:42 PM UTC WinForms 1
Tags: Grouping
James Blibo
Asked On June 12, 2007 11:47 PM UTC

I am handling the TableControlCurrentCellValidating event.
However, I noticed that when users clicked in a cell (ggc ActiveCurrentCellBehavior = SelectAll), change the value using keyboard, click in the same cell using the mouse, and the click in another cell, the TableControlMouseDown event is being raised before the TableControlCurrentCellValidating. This is causing problems because I've 'lost' my original column and row index.

Rajagopal [Syncfusion]
Replied On June 13, 2007 06:42 PM UTC

Hi James,

When you click on a cell its the TableControlMouseDown event that gets triggered, but the clicked cell will get focused (or) become the currentcell only after the succesfull validation of the previous cell that was in edit mode. So, instead of getting the row and column indexes of the currentcell from the TableControlMouseDown, you can get them from the TableControlCurrentCellValidating event handler.

void gridGroupingControl1_TableControlCurrentCellValidating(object sender, GridTableControlCancelEventArgs e)
GridCurrentCell cc = e.TableControl.CurrentCell;
Console.WriteLine("RowIndex: {0} ; ColIndex: {1}", cc.RowIndex, cc.ColIndex);
// validation code here //

Let us know if you have any further questions.


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

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