This question is locked. New answers and comments are not allowed.
Hi,
I am trying to be able to navigate a gridview and select multiple rows.
and
and
However it seems like the currentitem always stays the same the first in the row in the gridview. How do I move the currentItem / get a hold of it ?, I am using up/down arrows to navigate in the grid.
Best regards
Ole Ronne
I am trying to be able to navigate a gridview and select multiple rows.
<telerik:RadGridView x:Name="TraningEventEmployee" AutoGenerateColumns="False" SelectionMode="Multiple" TabNavigation="Cycle"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Name}" Header="Name" SortingState="Descending"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=PhoneNumber}" Header="Phone"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SocialSecurityNumber}" Header="SSN"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Position1.Position1}" Header="Position"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Tasks.Task}" Header="Task"/> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=WorkAreas.WorkArea}" Header="Work area"/> </telerik:RadGridView.Columns> </telerik:RadGridView>and
public EmployeesPopUpList(HSETrainingContext ctx) { InitializeComponent(); GlbCtx = ctx; this.LayoutRoot.KeyUp += new KeyEventHandler(LayoutRoot_KeyUp); TraningEventEmployee.ItemsSource = GlbCtx.Employees; }void LayoutRoot_KeyUp(object sender, KeyEventArgs e) { if (e.Key==Key.Enter) { this.DialogResult = true; this.Close(); } if (e.Key == Key.Space) { TraningEventEmployee.SelectedItems.Add(TraningEventEmployee.CurrentItem); } }However it seems like the currentitem always stays the same the first in the row in the gridview. How do I move the currentItem / get a hold of it ?, I am using up/down arrows to navigate in the grid.
Best regards
Ole Ronne