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

ComboBox does not bind "TextProperty" anymore

6 Answers 317 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ronny
Top achievements
Rank 1
Ronny asked on 12 Mar 2020, 05:56 AM
<telerik:RadComboBox IsEditable="True" IsTextSearchCaseSensitive="False" Text="{Binding SchoolEducation}" ItemsSource="{Binding SchoolEducations}" />

 

Hi,

since Release 2020.1.218 the TextProperty-Binding does not refresh my property in my ViewModel.

I also tried the current internal version.

Best regards,
Ronny Glass

6 Answers, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 15 Mar 2020, 01:41 PM

Hi Ronny,

Thank you for the provided code snippet.

Can you try setting the binding mode of the Text property to TwoWay?

<telerik:RadComboBox IsEditable="True" IsTextSearchCaseSensitive="False" Text="{Binding SchoolEducation, Mode=TwoWay}" ItemsSource="{Binding SchoolEducations}" />

Give this approach a try and let me know if it works for you.

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Ronny
Top achievements
Rank 1
answered on 16 Mar 2020, 04:39 AM

Hi Dinko,

it helps. But why the default behaviour changed? Isn't TwoWay what would be expected?

Regards,
Ronny

0
Dinko | Tech Support Engineer
Telerik team
answered on 18 Mar 2020, 01:50 PM

Hello Ronny,

I am not aware of any recent changes to the Text property of the RadComboBox. May I ask you to share from which version you have migrated so I can compare this behavior on my side? Can you also share the set-up of your model property? Can you confirm that you haven't made any changes to the project after the update? Any additional information which you think will help me to reproduce this will be highly appreciated.

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Ronny
Top achievements
Rank 1
answered on 19 Mar 2020, 04:49 AM

Hi Dinko,

my customer reported the problem when I changed from 2020.1 to 2020.1 SP1. In my code, nothing changed since I implemented it. Maybe the behavior changed from 2019.3 SP2 to 2020.1 because changes in this area are not so often.

 

public sealed class EditEmployeeViewModel : EditDialogViewModelBase<Employee>
{
    private string _schoolEducation;
 
    public IList<string> SchoolEducations { get; private set; }
 
    public string SchoolEducation
    {
        get => this._schoolEducation;
        set
        {
            if (this._schoolEducation != value)
            {
                this._schoolEducation = value;
                this.RaisePropertyChanged(() => this.SchoolEducation);
            }
        }
    }
}

 

Regards,
Ronny

0
Dinko | Tech Support Engineer
Telerik team
answered on 23 Mar 2020, 10:54 AM

Hi Ronny,

Thank you for the provided code snippet. I have tried to reproduce this behavior using the specified version but to no avail. On my side, if I don't set the binding Mode to TwoWay, the setter of the SchoolEducation property won't be called when I typed something in the RadComboBox. Can you take a look at the attached project and let me know if I am missing something from your implementation?

Regards,
Dinko
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Ronny
Top achievements
Rank 1
answered on 29 Mar 2020, 08:50 AM

Hi Dinko,

I found my problem. I reworked my application some time ago. I changed ComboBox to RadComboBox. Your default Binding-Behaviour ist different from ComboBox, which is a little bit confusing.

Thank you very much for your support.

Best Regards,
Ronny

Tags
ComboBox
Asked by
Ronny
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Ronny
Top achievements
Rank 1
Share this question
or