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
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.
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.
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.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?
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
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.
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.
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?