- Home
- Forum
- Xamarin.Forms
- Strange error in SfListView ItemSource after upgrade to 19.1.0.69
Strange error in SfListView ItemSource after upgrade to 19.1.0.69
Hi
Today I upgrade to ver 19.1.0.69 and suddenly ocurrs one bug in my program filling an ObservableCollection with binding ItemSource to one SfListView
My XAML
...
<ContentView.Content>
<Grid x:Name="GridProgramados" >
<sync:SfListView x:Name="lstProgramados"
ItemsSource="{Binding ListaProgramados, Mode=TwoWay}"
SelectionMode="None"
SelectionGesture="Tap"
ItemSpacing="0,5,0,5"
AutoFitMode="DynamicHeight">
<sync:SfListView.ItemTemplate>
<DataTemplate x:Name="ItemTemplate1">
<Grid HorizontalOptions="FillAndExpand">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
...
The error is:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
The code that fills this collection is:
...
private ObservableCollection<TarjetaInfo> _listaProgramados = new ObservableCollection<TarjetaInfo>();
...
var tarjetas = await LoadData();
var tListaProgramados = tarjetas.Where(x => x.Estatus == ESTATUS.INCIALES.ToString());
ListaProgramados = new ObservableCollection<TarjetaInfo>(tListaProgramados.ToList());
For testing purposes if comment the line in bold in the following property, the program fills the collection fine, or comment xaml code, whatever!
public ObservableCollection<TarjetaInfo> ListaProgramados
{
get => _listaProgramados;
set
{
_listaProgramados = value;
//OnPropertyChanged();
}
}
Returning to version 19.1.0.63, my program runs fine!
Please help!
SIGN IN To post a reply.
2 Replies
JL
jose luis barajas
June 16, 2021 09:19 PM UTC
Update
I move my project to new folder and upgrade again to version 69 and error is gone!
I will keep doing more tests...
thanks!
LN
Lakshmi Natarajan
Syncfusion Team
June 17, 2021 05:12 AM UTC
Hi Jose,
Thank you for using Syncfusion products.
We are glad that the reported issue has been resolved at your side. Please get in touch with us if you require any further assistance. As always we are happy to help you out.
Lakshmi Natarajan
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
-
JL jose luis barajas
- Jun 16, 2021 08:11 PM UTC
- Jun 17, 2021 05:12 AM UTC