HA
haneefm
Syncfusion Team
April 11, 2007 05:50 PM UTC
Hi Anupreet,
One way you can do this by handling the GridCurrencyTextBox. MouseDown event and display the context menu for editing currency cell. Here is a code snippet to show this.
//Form_Load event.
GridCurrencyTextBoxCellRenderer cr = this.gridControl1.CellRenderers["Currency"] as GridCurrencyTextBoxCellRenderer;
GridCurrencyTextBox gct = cr.Control as GridCurrencyTextBox;
if( gct != null )
gct.MouseDown +=new MouseEventHandler(gct_MouseDown);
private void gct_MouseDown(object sender, MouseEventArgs e)
{
GridControl grid = ((Control)sender).Parent as GridControl;
if( grid != null )
{
if( grid.CurrentCell.IsEditing && e.Button == MouseButtons.Right )
contextMenu.Show("Welcome");
}
}
Best regards,
Haneef