I need to show a Confirm prompt one a user is finished editing a cell.
Here is my current CellEditEnded eventhandler:
oldNickname and newNickname are global variables so I can keep up with the new/old values.
however, when any button on the prompt is clicked (or anywhere on the screen is clicked) another CellEditEnded event is fired but e.OldData is the same as e.NewData which overwrites my global variables.
I don't understand why the second event is firing.
Here is my current CellEditEnded eventhandler:
private void gvAccounts_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
{
if (e.EditAction == Telerik.Windows.Controls.GridView.GridViewEditAction.Cancel)
return;
oldNickname = e.OldData.ToString();
newNickname = e.NewData.ToString();
// nothing has changed
if (oldNickname == newNickname)
return;
RadWindow.Confirm("Are you sure you want to change this nickname to " + newNickname + "?", this.ChangeNickname);
}
oldNickname and newNickname are global variables so I can keep up with the new/old values.
however, when any button on the prompt is clicked (or anywhere on the screen is clicked) another CellEditEnded event is fired but e.OldData is the same as e.NewData which overwrites my global variables.
I don't understand why the second event is firing.