i cant clean selected item in viewmodal

       private Firma _selectedFirma { get; set; }
        public Firma SetlectedFirma
        {
            get { return _selectedFirma; }
            set
            {
                if(_selectedFirma!=value)
                {
                    _selectedFirma = value;
                    //Do whatewer
                    NotifyPropertyChanged("SetlectedFirma");
                }
            }
        }


        public Command resetCommand { get; set; }
        public  void reset(Object obj)
        {
 
            SetlectedFirma = null;

        }


-----------------------------------------------------------
   <combobox:SfComboBox
                        x:Name="CountryPicker" 
                        DataSource="{Binding Firmalar}"
                        DisplayMemberPath="FirmaAdi"
                            SelectedValuePath="FirmaAdi"
                        
                        MultiSelectMode="None"
   SelectedIndex="{Binding SelectedIndex}"
                        SelectedItem="{Binding SetlectedFirma,Mode=TwoWay}"
                        Style="{StaticResource ComboBoxStyle}"
                        Watermark="Firma Adı">
                            <combobox:SfComboBox.DropDownButtonSettings>
                                <combobox:DropDownButtonSettings Width="30" Height="30">
                                    <combobox:DropDownButtonSettings.View>
                                        <Label
                                        Margin="0"
                                        FontFamily="{StaticResource FontIcons}"
                                        FontSize="25"
                                        HorizontalTextAlignment="Center"
                                        Text="{StaticResource DropDownButtonIcon}"
                                        TextColor="{DynamicResource Gray-600}"
                                        VerticalTextAlignment="Center" />
                                    </combobox:DropDownButtonSettings.View>
                                </combobox:DropDownButtonSettings>
                            </combobox:SfComboBox.DropDownButtonSettings>
                        </combobox:SfComboBox>
                    </border:SfBorder>

                    <buttons:SfButton
            
                    Command="{Binding resetCommand}"
        
                    Margin="0,8,0,24"
                    BorderWidth="0"
            

                    CornerRadius="20"
                    FontFamily="{StaticResource Montserrat-SemiBold}"
                    FontSize="16"
                    HeightRequest="40"
                    HorizontalOptions="{OnIdiom Default=EndAndExpand,
                                                Phone=CenterAndExpand}"
                    Style="{StaticResource SubmitButtonStyle}"
                    Text="Kaydet"
                    WidthRequest="200" />



1 Reply

SP Sakthivel Palaniyappan Syncfusion Team April 6, 2020 10:06 AM UTC

Hi Ercan,

Greetings from Syncfusion.

We have analyzed your code snippet and prepared a sample based on this. Please find the sample from below link,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/GettingStarted1732341204

We request you to try our sample  and if you are still facing the reported problem,  can you please revert us by modifying the sample based on your application along with replication procedure. This will be help us to investigate further and provide you with a better solution at the earliest.

Regards,
Sakthivel P. 


Loader.
Up arrow icon