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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DropDownUserCell and selectively disabling popup at runtime

Thread ID:





60924 May 15,2007 02:56 PM UTC May 16,2007 08:13 PM UTC WinForms 2
Tags: Grouping
James Blibo
Asked On May 15, 2007 02:56 PM UTC

I have a cell that is a DropDownUserCell. How can I at runtime enable and disable this control.
In the disabled state, I do not want the dialog to popup or show.

I tried cancel the event in...


but that doesn't work becuase I guess the drop down isn't a standard combobox.

haneefm [Syncfusion]
Replied On 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);
if (ce.Cancel)
e.Cancel = true;
ddUser.Size = ce.Size;

this.DropDownContainer.Size = ddUser.Size;
ddUser.Visible = true;

You can cancel the drop-down window by setting the e.Cancel property to false in a CurrentCellShowingDropDown event.

Best regards,

James Blibo
Replied On May 16, 2007 08:13 PM UTC

works like a charm... thx


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon