Hi,
Here is a GridDataBoundGrid 'gridDataBoundGrid1'.It has three columns(Name, Location and Amount);
Static columns: Name and Location.
Dynamic columns: Amount column contains Textbox control.
How i have implemented?
Took two events
1)this.gridDataBoundGrid1.CellDoubleClick +=new GridCellClickEventHandler(gridDataBoundGrid1_CellDoubleClick);
2)this.gridDataBoundGrid1.CurrentCellControlDoubleClick +=new ControlEventHandler(gridDataBoundGrid1_CurrentCellControlDoubleClick);
The first event fires when we double click on static columns whereas second event fires when we double click on dynamic columns (columns which contains controls). Second event fires only when the control in the cell contains focus only.
1) When i right double click on static columns it should not display the message, that i have fixed by adding code
"if(e.MouseEventArgs.Button != MouseButtons.Right)"
{
MessageBox.Show("Double Click");
}
2) How can i prevent from showing message when user right double clicks on control based columns(Amount)?
Below is the attchment for this example.
Thanks
Raghavendra
SampleGridExp.zip