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

SelectedItem/CurrentItem Binding Problem

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

I have the following wpf
<Telerik:RadGridView   
            Margin="5" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1"   
            SelectionMode="Single" 
            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}" 
            x:Name="GridViewHistory"   
            AutoGenerateColumns="False"
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)

thanks,
dogu

1 Answer, 1 is accepted

Sort by
0
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,
Ross
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.
Tags
GridView
Asked by
Dogu
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or