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

ReadOnly MultiColumnComboBox

Thread ID:





91842 Dec 4,2009 07:20 PM UTC Dec 11,2009 05:25 AM UTC WinForms 7
Tags: Tools
Administrator [Syncfusion]
Asked On December 4, 2009 07:20 PM UTC

Using the 7.3 libraries, we've noticed that when a MultiColumnComboBox is ReadOnly, the SelectedValue can still change when the combo is dropped down and the user "selects" a row.
While the actual text doesn't change (good) and the user can drop down and look at values even though the control is ReadOnly (good) the SelectedValue seems to be changed when the user clicks on one of the rows.
The problem for us is that we're binding data to the SelectedValue. It seems that the underlying bound field gets changed even if we cancel out of a Validating event handler.
This seems to be different than in previous versions. Is it expected and is there anything we can do to prevent the SelectedValue from being changed when the control is ReadOnly?

This is reproduceable in the 7.3 dashboard samples.
Mark Atkinson

Nandakumar R [Syncfusion]
Replied On December 7, 2009 06:11 AM UTC


Thanks for your interest in Syncfusion Essential Studio. We are not able to see this issue in testing with and Can you please try the following sample and the video and let me know if I am missing anything in this.




Administrator [Syncfusion]
Replied On December 8, 2009 11:10 PM UTC

Here's an updated version of the MultiColumnComboBoxSampleControl.cs file from your sample.
The control is set to ReadOnly but the SelectedValue gets changed.
To reproduce, just select a new value from the drop down combo and then change focus to the multiline control below. Changing focus will fire the Validation events and a message box will display the controls SelectedValue.


Nandakumar R [Syncfusion]
Replied On December 9, 2009 07:21 AM UTC


There is no .cs file in this. Can you please resend the project with the changes? Please zip the folder and send all the files, so that we can check the changes.


Administrator [Syncfusion]
Replied On December 9, 2009 10:03 PM UTC

Here's another .zip file. I think all of the necessary files are there, but the only file that I made changes to was MultiColumnComboBoxSampleControl.cs

You need to invoke the Validate events to see the bug (e.g. lose focus from the control)


Nandakumar R [Syncfusion]
Replied On December 10, 2009 04:26 AM UTC


Thanks for the details.

The ReadOnly property is used to make the TextBox part ReadOnly. This will not affect the SelectedValue of the Control. However to get the same value in the validated event, you can use the TextBox value. This is the expected behaviour of the Control.

void multiColumnBoundCombo_Validated(object sender, EventArgs e)

Please try this and let me know if this helps.


Administrator [Syncfusion]
Replied On December 10, 2009 05:02 PM UTC

The Text and the SelectedValue are two different properties and could have completely different values. The DisplayMember and ValueMember properties can be set to different fields and then the Text and SelectedValue would be different.

I'm not trying to get any value in the Validated event - I'm only using it to demonstrate where the bug is.

Something has changed in a recent Syncfusion release that has changed the behaviour of this control in such a way that it is no longer safe to bind it to a DataTable or DataView when the control's ReadOnly property is set to true.

Again, we're binding the SelectedValue property like this:
DataBindings.Add("SelectedValue", dataView, "Code", true);

...and then setting the DataSource to a related lookup/code table as in the sample.

But when a user drops down the panel and clicks on a row when the control is in a ReadOnly state, the data in the bound data source changes.

We've worked around this by not allowing the user to drop down the panel if the control is ReadOnly but it is not desirable. We'd like the old behaviour where the user can drop down the panel to see the values but not actually select one. Currently, if they click on a row in the drop down, the SelectedValue will change and, consequently, so will the live data that the SelectedValue is bound to.

Nandakumar R [Syncfusion]
Replied On December 11, 2009 05:25 AM UTC


Thanks for the details. I was able to see the difference in both the versions. I have reported this issue to our Developers and will get back to you in one business day with the timeline on fixing this issue.



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

or the page will be automatically redirected to 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