Workaround:
1) subscribe to DataGrid PropertyChanged and when the e.PropertyName is Height, set the selected item
DataGrid.PropertyChanged += DataGrid_PropertyChanged; private void DataGrid_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { var data = sender as RadDataGrid; if (e.PropertyName == "Height") { var firstItem = ((List<Person>)this.DataGrid.ItemsSource).First(); this.DataGrid.SelectItem(firstItem); if (DataGrid.SelectedItem != null) { DisplayAlert("", "", "cancel"); } } }
2) Use a dispatcher with a delay, then inside it set the selected item.
DataGrid.ItemsSource = this.Data; Device.StartTimer(TimeSpan.FromMilliseconds(200), () => { var firstItem = ((List<Person>)this.DataGrid.ItemsSource).First(); this.DataGrid.SelectItem(firstItem); if (DataGrid.SelectedItem != null) { DisplayAlert("", " ", "cancel"); } return false; });
Regards, Didi Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.