Hi Rama Krishna,
Below are the steps that you are supposed to do to have a onLookup event on any form control.
1) Create a event handler class
2) Right click on the form control's onLookUp event and paste it inside the event handler class and implement the logic as shown below. FYI - Below is the sample method that I have created to populate the lookup on Name field (Grid control) on CustGroup form. Also I have used CustAccount as the Extended data type.
[FormControlEventHandler(formControlStr(CustGroup, Grid_Name), FormControlEventType::Lookup)]
public static void Grid_Name_OnLookup(FormControl sender, FormControlEventArgs e)
{
FormStringControl fsc = sender as FormStringControl;
fsc.performTypeLookup(extendedTypeNum(CustAccount));
FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs;
ce.CancelSuperCall();
}
Thank you. Hope this helps.
Regards,
Krishnam Raju