Hi John,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to add context menu on right
click. If there is any misunderstanding, please feel free to let me know.
I think we can handle the right click event of each cell's control. Here is
an example:
private void Form1_Load(object sender, System.EventArgs e)
{
this.dataGrid1.ControlAdded +=new
ControlEventHandler(dataGrid1_ControlAdded);
}
private void dataGrid1_ControlAdded(object sender, ControlEventArgs e)
{
if(e.Control is TextBox)
e.Control.MouseUp +=new MouseEventHandler(Control_MouseUp);
}
private void Control_MouseUp(object sender, MouseEventArgs e)
{
if(e.Button == MouseButtons.Right)
MessageBox.Show("Right Clicked!");
}
HTH.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."