Hello,
I am using scrollindexintoviewasync to keep my record in the screen after an edit. I have the below code. It reloads the grid and then calls the ScrollIndexIntoView to display the record. But it is displaying at the bottom of the grid. Could someone please give me an idea why please?
private void EditItem(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
{
GridViewRow row = e.Row;
int index = this.RadGridView.Items.IndexOf(this.RadGridView.SelectedItem);
GridData recordChanged = (GridData)e.NewData;
dataService.EditRecord(recordChanged);
this.RadGridView.ItemsSource = dataService.GetGridData();
this.RadGridView.ScrollIndexIntoViewAsync(index, null, new Action<FrameworkElement>((f) => { (f as GridViewRow).IsSelected = true; }), null);
LoadTablesAndGrid();
}
Thank you,
Aryn
I am using scrollindexintoviewasync to keep my record in the screen after an edit. I have the below code. It reloads the grid and then calls the ScrollIndexIntoView to display the record. But it is displaying at the bottom of the grid. Could someone please give me an idea why please?
private void EditItem(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
{
GridViewRow row = e.Row;
int index = this.RadGridView.Items.IndexOf(this.RadGridView.SelectedItem);
GridData recordChanged = (GridData)e.NewData;
dataService.EditRecord(recordChanged);
this.RadGridView.ItemsSource = dataService.GetGridData();
this.RadGridView.ScrollIndexIntoViewAsync(index, null, new Action<FrameworkElement>((f) => { (f as GridViewRow).IsSelected = true; }), null);
LoadTablesAndGrid();
}
Thank you,
Aryn