I want to call usercontrol event from the form where i am dropping the control.
this.usercontrol1.ultraGrid1_AfterSelectChange(object sender,AfterSelectChangeEventArgs e);
this gives error .. Invalid expression term 'object'. How to call usercontrol events from forms ??
You can call event handler methods directly, although you should note that this does not cause the control's AfterSelectChange event to fire it will simply execute the same code that is executed when that event fires. The compiler error is caused by your use of the parameter's type definitions in the method call. The presence of the terms 'object' and 'AfterSelectChangeEventArgs' are syntactically wrong for a method call, they are used to declare the method. The value of the sender in your case should either be null (so that the handling code can differentiate between actual event firings and programmatci callings) or a reference to the UltraGrid. The AfterSelectChangeEventArgs class is the class that contains information about the selection change; this could also be passed as null provided that the handling code is prepared to handle this.
Thanks for your response.