Telerik Forums
UI for WPF Forum
1 answer
26 views

I have the following XAML code:

<telerik:RadMultiColumnComboBox 
    VerticalAlignment="Top" 
    Width="250" 
    DisplayMemberPath="Name" 
    IsReadOnly="True" 
    SelectionMode="Single" 
    SelectionBoxesVisibility="Hidden" 
    CloseDropDownAfterSelectionInput="True"                   
    DropDownWidth="320"
    SelectedItem="{Binding SelectedMandant}">
    <telerik:RadMultiColumnComboBox.ItemsSourceProvider>
        <telerik:GridViewItemsSourceProvider ItemsSource="{Binding MandantCollection}" AutoGenerateColumns="False" RowIndicatorVisibility="Hidden"> 
            <telerik:GridViewItemsSourceProvider.Columns>
                <telerik:GridViewDataColumn Header="Mandant" DataMemberBinding="{Binding Path=Name}"/>
                <telerik:GridViewDataColumn 
                    Header="Letzter Abschluss" 
                    DataMemberBinding="{Binding Path=FibuAbschluss}" 
                    DataFormatString="{} {0:dd.MM.yyyy}" 
                    TextAlignment="Center" 
                    HeaderTextAlignment="Center"/>
            </telerik:GridViewItemsSourceProvider.Columns>
        </telerik:GridViewItemsSourceProvider>
    </telerik:RadMultiColumnComboBox.ItemsSourceProvider>
    <telerik:EventToCommandBehavior.EventBindings>
        <telerik:EventBinding EventName="SelectionChanged" Command="{Binding SelectedMandantChangedCmd}" RaiseOnHandledEvents="True" PassEventArgsToCommand="True"/>
    </telerik:EventToCommandBehavior.EventBindings>
</telerik:RadMultiColumnComboBox>

Now everything works fine beside that the first time when the UI is rendered, the RadMultiColumnComboBox Input does not show the current selected item.

I set the SelectedItem in the constructor of my view model:



private Mandant? _selectedMandant;
public Mandant? SelectedMandant
{
    get => _selectedMandant;
    set
    {
        _selectedMandant = value;
        OnPropertyChanged();
    }
}

public KontoViewModel(CommonDbContext commonDbContext, StruebyWinBContext winBContext) { ...... if(MandantCollection.Count > 0) { SelectedMandant = MandantCollection[0]; ...... } ....... }

I see that the SelectedMandat has a value and also it works fine after i select another item, then the item shows.

But the first time after loading, the RadMultiColumnComboBox Input does not show any value, its empty.

It should show the selected item that i set in the constructor of my view model.

Can anyone help me here, thanks

Osman
Top achievements
Rank 1
Iron
 updated answer on 18 Jan 2024
0 answers
29 views

Hello,

 

I am having an issue with RadMultiColumnComboBox. I am having to set to a large width for them to not line wrap. When I select an item it is doing this:

 

How can I prevent it from doing this? The width is more than twice the size of the largest element, and it is set to single select so there is no reason to wrap the text.

Tyler
Top achievements
Rank 1
 asked on 25 Oct 2023
1 answer
61 views
Hello, Im using a MultiColumnComboBox and I was wondering if there is a way to click anywhere in the combobox and open the dropdown? I tried combobox.OpenDropdown on GotFocus() but it didn't work. Currently it only opens the dropdown if I click in the button or OpenDropDownOnInput, but there is still a big blank space that does nothing if I click.
Dinko
Telerik team
 answered on 04 Oct 2023
1 answer
40 views

Hi Team,

I joined the project attaching Telerik.2020.2.617.45 version.

but I can download only 2023.xx version.

So How can i download 2020.2.617.45 version.

1 answer
56 views

Hello,

I am dealing with a minor bug on my pages that have a hidden panel that I show when adding new items. It shows the selected item, but also includes the text afterwards. It only happens when the dropdown visibility is collapsed. When I am populating the dropdowns I have tried setting  AutoCompleteProvider.SearchText = string.Empty and AutoCompleteProvider.MatchText = string.Empty and setting the panel to visible and then populating the value, but I cannot figure out how to clear out the text. What is a good work around for this bug. 

 I have attached an example project. To replicate my issue click "Populate Dropdown" then click "Toggle Visibility". If you toggle visibility before populating the issue will not occur. 
Stenly
Telerik team
 answered on 19 May 2023
1 answer
140 views

I have a RadMultiColumnComboBox with AutoCompleteMode="Search". If I type "asdf" into the combo box, close the dropdown without actually selecting an item, and then refresh the page I want to clear "asdf", but I cannot figure out how to clear this text. I have tried setting the selected Item to null, setting AutoCompleteProvider.SearchText to an empty string, and setting the selected index to -1. 

What am I doing wrong?

Martin Ivanov
Telerik team
 answered on 10 May 2023
1 answer
132 views
I have the following class

Class My Class
Class MyClass()
{
   public int Var1 {get; set; }
   public int Var2 {get; set; }
}
i want the selected item to show {var1}/{var2}
for now im doing (for now) is
DisplayMemberPath = "Var1"
but because its a String and a Dependency property i cannot attach a MultiBinding
and RadMultiColumnComboBox  does not have itemTemplate property
how can i achieve it

P.S 
I want the same behavior for the tooltip

p.s 2
i also want to center the selected text but it seems HorizontalContentAlignment  is not working


Thanks in advance

Martin Ivanov
Telerik team
 answered on 30 Jan 2023
0 answers
75 views

Hi,

 

Can we have RadMultiColumnComboBox restrict text input to items in the ItemsSource?

Same functionality as found in a editable RadComboBox with both IsEditable and IsReadOnly set to True.

Avrohom
Top achievements
Rank 1
Iron
Iron
 asked on 21 Jun 2022
2 answers
161 views

Please consider the attached image.

How can I prevent the editor from line breaking when the selected item in the combobox fills out the whole (or more) width of the combobox editor? I want it to keep the height of a single line and just scroll the text, like in a single line textbox.

ClausDC
Top achievements
Rank 1
Iron
 answered on 07 Jun 2022
1 answer
70 views

How can I add Sorting to the DropDown GridView, so that when the User first opens the DropDown, the GridView is already sorted on one or more columns?

Martin Ivanov
Telerik team
 answered on 19 May 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?