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

Two way binding to SelectedItems and to SelectedItemsChanged event at the same time

1 Answer 771 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mohammad Tajari
Top achievements
Rank 1
Mohammad Tajari asked on 23 Sep 2020, 05:30 PM

Hi,

Can I have two way binding to SelectedItems and to SelectedItemsChanged event at the same time like the followings:

<TelerikTreeView Data="Items" @bind-SelectedItems="SelectedItems" @bind-SelectedItems:event="SelectedItemsChanged">

<TreeViewBindings>
        <TreeViewBinding IdField="Code" TextField="Title" />
    </TreeViewBindings>

</TelerikTreeView>

working? As Blazor allows binding to event handlers by convensions?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 Sep 2020, 05:47 PM

Hello Mohammad,

The framework does not allow using both two-way binding and the bindable event at the same time. You can read more about this here: https://docs.telerik.com/blazor-ui/getting-started/value-vs-data-binding

 

Regards,
Marin Bratanov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
TreeView
Asked by
Mohammad Tajari
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or