This is a migrated thread and some comments may be shown as answers.

unbound and styling questions

2 Answers 43 Views
MultiColumnComboBox
This is a migrated thread and some comments may be shown as answers.
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
ToltingColtAcres asked on 29 Apr 2020, 03:12 PM

Two questions:

1.

Can someone point me to an example of an unbound multicolumncombobox, e.g. adding items manually? I found an example

https://docs.telerik.com/devtools/winforms/controls/multicolumncombobox/populating-with-data/unbound-mode

 

but this refers to properties which do not seem to exist (e.g. MultiColumnComboBoxElement and EditorControl).

 

2. In a databound multicolumncomboBox, when the user uses the drop-down, the drop-down appears with a transparent background, so you can see the elements rendered under it as part of the text... this makes it almost impossible to read. Is there a way to remove this transparency? I do not see a property. Is there a reason why this control is designed this way as opposed to being like a standard drop-down combo box?

 

2 Answers, 1 is accepted

Sort by
0
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
answered on 30 Apr 2020, 11:53 AM

On item #1, I found a reference: 
https://docs.telerik.com/devtools/aspnet-ajax/controls/multicolumncombobox/data-binding/server-side

which specifically deals w/ aspx vs the other example I found (winforms, so different properties). From this I gather the only way to manually add items is to construct a datasource in code-behind and then bind it. 

 

On item #2, I found adding the below code to the definition eliminated the issue.

<AnimationSettings>
  <OpenSettings></OpenSettings>
  <CloseSettings></CloseSettings>
</AnimationSettings>
0
Peter Milchev
Telerik team
answered on 04 May 2020, 10:26 AM

Hello,

The MultiColumnComboBox can be declared with no data source and no items. Then, you can either set a data source and rebind or just add the items programmatically as demonstrated with the example below:

<telerik:RadButton runat="server" ID="RadButton1" Text="Add 10 items to MultiColumnComboBox" OnClick="RadButton1_Click" AutoPostBack="true" />

<telerik:RadMultiColumnComboBox runat="server" ID="RadMultiColumnComboBox1" DataTextField="text" DataValueField="value"></telerik:RadMultiColumnComboBox>

protected void RadButton1_Click(object sender, EventArgs e)
{
    var count = RadMultiColumnComboBox1.Items.Count;
    for (int i = count; i < count + 10; i++)
    {
        RadMultiColumnComboBox1.Items.Add(new MultiColumnComboBoxItem() { Text = "Item #" + (i + 1), Value = (i + 1).ToString() });
    }
}

Also, the Dropdown should not be transparent by default and the workaround you found is quite strange. If you can replicate the issue with a simple MultiColumnComboBox with no external styles please share it with us for further investigations.

Meanwhile, please ensure there are no JavaScript errors in the browser's console and also there are no failing requests in the Network tab of the DevTools(F12) of the browser.

Regards,
Peter Milchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
MultiColumnComboBox
Asked by
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
Answers by
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
Peter Milchev
Telerik team
Share this question
or