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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Another question for MultiColumn Combobox

Thread ID:





19482 Sep 27,2004 03:46 PM UTC Nov 23,2006 07:36 AM UTC WinForms 3
Tags: Tools
Asked On September 27, 2004 03:46 PM UTC

Hi, I have another question for MultiColumn Combobox. If I left click on the MultiColumn Combobox, The dropDwon list also appear. How can I get rid of it? I want to show my own context menu when I left click multicolumn combox. In the regular combox, I did not see this probelm. Thanks a lot. --Shuyang He

Administrator [Syncfusion]
Replied On September 27, 2004 09:42 PM UTC

Hi Shuyang, I do see this problem here when the MultiColumnCombobox is in DropDownList mode. You could workaround this problem by handling the MultiColumnCombobox.PopupContainer''s BeforePopup event as shown below : this.multiColumnComboBox1.PopupContainer.BeforePopup += new CancelEventHandler(PopupContainer_BeforePopup); private void PopupContainer_BeforePopup(object sender, CancelEventArgs args) { if (Control.MouseButtons == MouseButtons.Right) { args.Cancel = true; this.contextMenu1.Show(this.multiColumnComboBox1, this.multiColumnComboBox1.PointToClient(Control.MousePosition)); } } I have attached a complete sample that demonstrates the above mentioned workaround. Please refer to it and let me know if you need further assistance. Regards, Guru Patwal Syncfusion, Inc.

Shuyang He
Replied On November 22, 2006 10:56 PM UTC

1) is there anyway I can prevent user to enter
invalide char?
For example:
I have two items:
if user enter asb, i don't want b shows on dropdown box.

2) use same example as above. when I type "as", multi combox actaully select "asd" instead of "as". Is this by design? I would like combox keep selection on "as".


--Shuyang He

Anupama Roy [Syncfusion]
Replied On November 23, 2006 07:36 AM UTC

Hi Shuyang,

Here goes the answer for your questions.

1) Is there anyway I can prevent user to enter invalide char?

Currently Essential Studio MultiColumnComboBox does not exhibit a property or an event that would validate the user entries which are not there in the list.However,as a workaround I can suggest you to handle the TextChanged event and do a validation based on the index returned by FindStringExact() method as shown below.Here in the example,if the text is not found in the internal ListBox list,it will show up a standard message and will clear the text in the TextBox.

public void clear()
this.multiColumnComboBox1.TextBox.Text =null;
this.multiColumnComboBox1.ListBox.SelectedIndex =-1;

private void multiColumnComboBox1_TextChanged(object sender, System.EventArgs e)
if(-1==this.multiColumnComboBox1.FindStringExact (this.multiColumnComboBox1.TextBox.Text,true))

MessageBox.Show ("Invalid Entry");


2) Regarding second query,if you ask me whether it is by design,answer is yes,internal AutoComplete behavior is currently like this.However,I understand the requirement and it sounds to be the expected behavior of AutoCompletion and hence i should say it is a bug.As the AutoComplete codings are completely sealed,I am afraid I cannot provide you a workaround for now.However,we will be modifying our source code soon in order to reflect the changes as requested.Till then we kindly request you to bear with us.

I am not including a sample here as we are not sure about the Essential Studio version you are working with.If you would like to have a look at the implementation of this code,kindly let me know your framework details as well as Essential Studio version details so that I can include it here.

Please feel free to get back to us if you need further assistance.




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

Live Chat Icon For mobile
Live Chat Icon