Hello all,
I'm trying to find a way to get a event raised when you change some text on
a DataGrid Cell, I need to be able to search in another table what the user
typed on that cell.
I found this, but this only give me the row and the cell I change position
to.
[C#]
// Create an instance of the 'CurrentCellCha nged' EventHandler.
private void CallCurrentCell Changed()
{
myDataGrid.Curr entCellChanged += new EventHandler(Gr id_CurCellChang e);
}
// Raise the event when focus on DataGrid cell changes.
protected void Grid_CurCellCha nge(object sender, EventArgs e)
{
// String variable used to show message.
string myString = "CurrentCellCha nged event raised, cell focus is at ";
// Get the co-ordinates of the focussed cell.
string myPoint = myDataGrid.Curr entCell.ColumnN umber + "," +
myDataGrid.Curr entCell.RowNumb er;
// Create the alert message.
myString = myString + "(" + myPoint + ")";
// Show Co-ordinates when CurrentCellChan ged event is raised.
MessageBox.Show (myString, "Current cell co-ordinates");
}
Anyone know?
Thanks
I'm trying to find a way to get a event raised when you change some text on
a DataGrid Cell, I need to be able to search in another table what the user
typed on that cell.
I found this, but this only give me the row and the cell I change position
to.
[C#]
// Create an instance of the 'CurrentCellCha nged' EventHandler.
private void CallCurrentCell Changed()
{
myDataGrid.Curr entCellChanged += new EventHandler(Gr id_CurCellChang e);
}
// Raise the event when focus on DataGrid cell changes.
protected void Grid_CurCellCha nge(object sender, EventArgs e)
{
// String variable used to show message.
string myString = "CurrentCellCha nged event raised, cell focus is at ";
// Get the co-ordinates of the focussed cell.
string myPoint = myDataGrid.Curr entCell.ColumnN umber + "," +
myDataGrid.Curr entCell.RowNumb er;
// Create the alert message.
myString = myString + "(" + myPoint + ")";
// Show Co-ordinates when CurrentCellChan ged event is raised.
MessageBox.Show (myString, "Current cell co-ordinates");
}
Anyone know?
Thanks
Comment