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.
Unfortunately, activation email could not send to your email. Please try again.

When handling TableControlCurrentCellValidating event, TableControlMouseDown is being first

Thread ID:

Created:

Updated:

Platform:

Replies:

62316 Jun 12,2007 07:47 PM Jun 13,2007 02:42 PM Windows Forms 1
loading
Tags: Grouping
James Blibo
Asked On June 12, 2007 07:47 PM

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 02:42 PM

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

CONFIRMATION

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.

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.

;