Hi guys,
The problem is like this. I have a ultragrid and i want to be able to right click on it and get a menu. Done that. I used a Ultratoolbarsmanager to do this. The toolclick event is like this:
private void utmTrans_ToolClick(object sender, ToolClickEventArgs e){ switch(e.tool.Key) { case "Delete": if(MessageBox.Show("Are you sure you want to delete row?","Delete Row",......) == DialogResult.Yes) { //Delete ROW } Break; }}
now when the message displays and i choose "NO" the event is called again and again. sometimes up to 5 times, and i have to keep clicking NO. I sure that is not how it's suppose to operate.
I need your help in solving this one.
Thanks in advance.
I figured out the problem. I was using the grid_MouseUp event rather than the Grid_MouseDown to get which mouse buttion was clicked. Using the mouseDown for some reason prevented the multiple firing of the ToolClick event.
Sorry guys, that wasn't the solution. I think the problem was that i was creating the event handler multiple times and not once. so moving the code to the form load event seems to solve the problem.
Bless..