We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

ContextMenu

How to add ContextMenu only in the child grid for GGC. Thanks .

2 Replies

AD Administrator Syncfusion Team November 24, 2005 03:02 PM UTC

Try handling the TableControlCellClick event and conditionally showing your contextmenu there.
private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
{
	if(e.Inner.MouseEventArgs.Button == MouseButtons.Right
		&& e.TableControl.TableDescriptor.Name == "ChildTable")
	{
		this.contextMenu1.Show(this.gridGroupingControl1, this.gridGroupingControl1.PointToClient(Control.MousePosition));
	}
}


VI vihar November 25, 2005 06:44 AM UTC

Thanks Clay Burch Its Working Fine .... >Try handling the TableControlCellClick event and conditionally showing your contextmenu there. >
>private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
>{
>	if(e.Inner.MouseEventArgs.Button == MouseButtons.Right
>		&& e.TableControl.TableDescriptor.Name == "ChildTable")
>	{
>		this.contextMenu1.Show(this.gridGroupingControl1, this.gridGroupingControl1.PointToClient(Control.MousePosition));
>	}
>}
>

Loader.
Live Chat Icon For mobile
Up arrow icon