SelectedItem/CurrentItem Binding Problem

2 posts, 0 answers
  1. Dogu Tumerdem
    Dogu Tumerdem avatar
    39 posts
    Member since:
    Sep 2006

    Posted 23 Dec 2009 Link to this post


    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)

  2. Rossen Hristov
    Rossen Hristov avatar
    2478 posts

    Posted 28 Dec 2009 Link to this post

    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.
  3. DevCraft banner
Back to Top