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
close icon

When handling TableControlCurrentCellValidating event, TableControlMouseDown is being first

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.

1 Reply

RA Rajagopal Syncfusion Team 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.
Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon