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

Vinz: How do call GripGroupingControl Events from other Event procedures

Hi, I''m having problem trying to call the GripGroupingControl_TableControlCurrentCellControlDoubleClick event procedure from Button_Click event procedure. There are 2 input parameters (ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlControlEventArgs)to pass into the target event. Can anyone advice me what is the appropriate paramters to pass in ?? if I want to call from this event from another object event procedure?? thanks alot :)

1 Reply

AD Administrator Syncfusion Team November 9, 2004 08:14 AM UTC

You understand that calling this method does not ''do'' a double click. It simply executes the code that you have placed in this method. If you do want to call this method, then you will have to provide the arguments. And if you want to call it from another class, you would have to make it a public member.
public void gridGroupingControl1_TableControlCellDoubleClick(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs e)
{
	Console.WriteLine("gridGroupingControl1_TableControlCellDoubleClick");
	Console.WriteLine("row {0}  col {1}", e.Inner.RowIndex, e.Inner.ColIndex);
}

private void button1_Click(object sender, System.EventArgs e)
{
	//you would want to set the row & col and X & Y as you want them
	GridCellClickEventArgs innerArg = new GridCellClickEventArgs(2, 2, new MouseEventArgs(MouseButtons.Left, 1, 2, 2, 0), false);
	GridTableControlCellClickEventArgs arg = new GridTableControlCellClickEventArgs(this.gridGroupingControl1.TableControl, innerArg);
	this.gridGroupingControl1_TableControlCellDoubleClick(this.gridGroupingControl1.TableControl, arg);
}

Loader.
Live Chat Icon For mobile
Up arrow icon