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

SelectedItem/CurrentItem Binding Problem

1 Answer 129 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Dogu asked on 23 Dec 2009, 11:55 AM

I have the following wpf
            Margin="5" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1"   
            ItemsSource="{Binding Mode=TwoWay, Path=CurrentCOAContext.Values, UpdateSourceTrigger=PropertyChanged}" 
            SelectedItem="{Binding Mode=TwoWay, Path=CurrentCOAContext.Values.CurrentItem, UpdateSourceTrigger=PropertyChanged}" 
            CurrentItem="{Binding Mode=TwoWay, Path=CurrentCOAContext.Values.CurrentItem, UpdateSourceTrigger=PropertyChanged}" 
In this code I am expectinting to be visually updated the grid with the value of CurrentItem. But unfortunately it is not shows the row indicator to that row nor the selection. I tried to bind SelectedItem and CurrentItem members independently, but resulting same.

Are there any way to do this ? Because I am fully concentrated to update the visuals with the underlying data (I think that's the best practice of WPF), so I don't want to break this rule with extraordinary codes.

(My version is 2009.3.1208)


1 Answer, 1 is accepted

Sort by
Rossen Hristov
Telerik team
answered on 28 Dec 2009, 09:46 AM
Hi dogu.tumerdem,

I have prepared a small sample project that demonstrates SelectedItem Binding. Select different rows in the list box below to see how they are selected in the grid above. I hope this helps.

Best wishes,
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Asked by
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question