|
private void OnDataGrid_SortColumnsChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSortColumnsChangedEventArgs e)
{
this.dataGrid.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.ContextIdle, new Action(() =>
{
if (dataGrid.View != null && dataGrid.View.Records.Any())
{
this.dataGrid.SelectedItem = this.dataGrid.View.Records[0];
this.dataGrid.ScrollInView(new RowColumnIndex(this.dataGrid.GetFirstRowIndex(), this.dataGrid.ResolveToStartColumnIndex()));
}
}));
} |
System.Windows.Data Error: 23 : Cannot convert 'Syncfusion.Data.RecordEntry' from type 'RecordEntry' to type 'SfDataGridError.KdAnalyseKopf' for 'de-DE' culture with default conversions; consider using Converter property of Binding. NotSupportedException:'System.NotSupportedException: TypeConverter kann nicht von Syncfusion.Data.RecordEntry konvertieren.So instead we just use the Data Property of the first RecordEntry to avoid using a Converter.
bei System.ComponentModel.TypeConverter.GetConvertFromException(Object value)
bei System.ComponentModel.TypeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
bei MS.Internal.Data.DefaultValueConverter.ConvertHelper(Object o, Type destinationType, DependencyObject targetElement, CultureInfo culture, Boolean isForward)'
System.Windows.Data Error: 7 : ConvertBack cannot convert value 'Syncfusion.Data.RecordEntry' (type 'RecordEntry'). BindingExpression:Path=SelectedCustomer; DataItem='KdAnalyseVM' (HashCode=38496415); target element is 'SfDataGrid' (Name='DataGridKdAnalyse'); target property is 'SelectedItem' (type 'Object') NotSupportedException:'System.NotSupportedException: TypeConverter kann nicht von Syncfusion.Data.RecordEntry konvertieren.
bei MS.Internal.Data.DefaultValueConverter.ConvertHelper(Object o, Type destinationType, DependencyObject targetElement, CultureInfo culture, Boolean isForward)
bei MS.Internal.Data.ObjectTargetConverter.ConvertBack(Object o, Type type, Object parameter, CultureInfo culture)
bei System.Windows.Data.BindingExpression.ConvertBackHelper(IValueConverter converter, Object value, Type sourceType, Object parameter, CultureInfo culture)'
this.DataGridKdAnalyse.SelectedItem = this.DataGridKdAnalyse.View.Records[0].Data;