IsEditable property ComboBoxAdv

Is there an MVVM example showing editable property of the ComboBoxAdv?

1 Reply 1 reply marked as answer

VR Vijayalakshmi Roopkumar Syncfusion Team March 24, 2021 09:15 AM UTC

Hi Mariusz  
  
Thank you for contacting Syncfusion Support. 
 
We have prepared a sample that tried to show how the editable property of ComboBoxAdv that shows demo in MVVM pattern.  We have bounded the IsEditable property in ViewModel class and bound the property in xaml. 
 
MainWindow.xaml 
 
 
 
<syncfusion:ComboBoxAdv 
x:Name="comboBoxAdv" 
Width="200" 
Height="25" 
HorizontalAlignment="Center" 
VerticalAlignment="Center" 
DisplayMemberPath="Name" 
IsEditable="{Binding Editable}" 
ItemsSource="{Binding List}"> 
<i:Interaction.Triggers> 
<i:EventTrigger EventName="KeyUp"> 
<local:FilterAction /> 
</i:EventTrigger> 
</i:Interaction.Triggers> 
</syncfusion:ComboBoxAdv> 
 
 
 
ViewModel.cs 
 
 
//Bound the editable property in xaml 
        private bool editable; 
 
        public bool Editable 
        { 
            get { return editable; } 
            set { editable = value; } 
        } 
 
 
 
Please try this solution and let us know if it is helpful. 
 
Regards, 
Vijayalakshmi VR 


Marked as answer
Loader.
Up arrow icon