Set Text property

Hello Syncfusion,

is it somehow possible to write some initial text to multicolumncombobox which is not part of the data in the bound table so that the text is shown before someone click on it?

I mean something like "Please select something" then you click on it and then the data columns appear.
best regards

Chris


7 Replies

MS Mahalakshmi Sugumar Syncfusion Team May 16, 2022 02:37 PM UTC


Hi Chris,

If you set the SelectedItem property to null after the DisplayMember property, you can set the default text using Text property. Please refer to the below code to set the initial text in MulticolumnComboBox,

Code:

   this.multiColumnComboBox1.DisplayMember = "FirstName";

    this.multiColumnComboBox1.SelectedItem = null;

    this.multiColumnComboBox1.Text = "Select a Item";



Regards,
Mahalakshmi Sugumar




HS han swurst May 17, 2022 07:07 AM UTC

Hello Syncfusion,

thanks for your reply.
Unfortunately your advice is not working.
I setup a test-button an put the following into the click event:

Me.multiColumnComboBox1.DisplayMember = "FirstName"
Me.multiColumnComboBox1.SelectedItem = Nothing
Me.multiColumnComboBox1.Text = "nothing to see here"

This is the Result:

2022-05-17 09_03_00-MCComboBox_Clear_VB(wird ausgeführt) - Microsoft Visual Studio.png

The text field gets emptied, but my text doesnt show up.

Can you please provide me an working example? Prefered VB over C#

best regards

Chris




MS Mahalakshmi Sugumar Syncfusion Team May 17, 2022 02:07 PM UTC

Hi Chris,

Please refer to the attached sample below for your requirement.

Please let us know if you need any further assistance.


Regards,
Mahalakshmi sugumar


Attachment: Combobox_sample_ffbf1114.zip


HS han swurst May 18, 2022 07:46 AM UTC

Hello syncfusion

thank you for the example.

It works fine until you set the dropdownstyle of the multicolumncombobox to .dropdownlist

It now display nothing instead of "Select a Item". Is this a bug ? If not, how can i display a text if dropdownstyle set to .dropdownlist?

best regards

Chris




MS Mahalakshmi Sugumar Syncfusion Team May 19, 2022 02:25 PM UTC

Hi crhris,

Currently, we are validating your reported query of “cannot display the water mark text in multicolumncombobox ”. We will validate and update you with the details by 20th May 2022.

Regards,
Mahalakshmi sugumar



MS Mahalakshmi Sugumar Syncfusion Team May 20, 2022 01:39 PM UTC

Hi Han swurst,


Thanks for confirming the requirement.

We have considered your requirement “To provide Cannot set the watermark to multicolumncombobox as a feature request. We will implement this feature in any of our upcoming releases.

You can track the status of this feature using the following feedback link:    
Feedback link:  https://www.syncfusion.com/feedback/35068/cannot-set-the-watermark-to-multicolumncombobox 

  

If you have any more specification replication procedure or a scenario to be tested, you can add it as a comment in the portal.   


Regards,

Mahalakshmi sugumar



HS han swurst May 25, 2022 08:02 AM UTC

Hi support,

thank you for keeping me informed.

best regards

Chris



Loader.
Up arrow icon