HA
haneefm
Syncfusion Team
May 15, 2007 11:49 PM UTC
Hi James,
You can override the DropDownContainerShowingDropDown method of the DropDownUserCellRenderer class and call RaiseCurrentCellShowingDropDown method that allows for an event that might cancel the drop or set its size. Below is a code snippet.
public override void DropDownContainerShowingDropDown(object sender, CancelEventArgs e)
{
GridCurrentCell cc = this.Grid.CurrentCell;
Size size = ddUser.Size;
GridCurrentCellShowingDropDownEventArgs ce = new GridCurrentCellShowingDropDownEventArgs(size);
Grid.RaiseCurrentCellShowingDropDown(ce);
if (ce.Cancel)
{
e.Cancel = true;
return;
}
ddUser.Size = ce.Size;
this.DropDownContainer.Size = ddUser.Size;
this.ddUser.SetValuesFromString(this.ControlText);
ddUser.Visible = true;
}
You can cancel the drop-down window by setting the e.Cancel property to false in a CurrentCellShowingDropDown event.
Best regards,
Haneef
JB
James Blibo
May 16, 2007 08:13 PM UTC
works like a charm... thx