Hi
--
I've a inherited DataGrid and a public override PreProcessMessage
The problem is that the method PreProcessMessage is not fired for the
last
row on the DataGrid.
public class DataGridUsers : DataGrid {
public const int WM_KEYDOWN = 0x100;
public override bool PreProcessMessage(ref Message msg) {
if (msg.Msg == WM_KEYDOWN) {
Keys code = (Keys)(int)msg.WParam & Keys.KeyCode;
if (code == Keys.Delete) {
if (MessageBox.Show("Delete this row?", "",
MessageBoxButtons.YesNo) == DialogResult.No) {
return true; //Aborts delete operation
}
}
}
return base.PreProcessMessage (ref msg);
}