This is a migrated thread and some comments may be shown as answers.

PaginationControl with SliveView raises an exception when deleting item from source list

3 Answers 29 Views
PaginationControl
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexey
Top achievements
Rank 1
Alexey asked on 12 Nov 2014, 06:51 PM
I have SlideView and PaginationControl.
<telerikPrimitives:RadSlideView Grid.Row="1"
                                Name="slideView"
                                ItemsSource="{Binding TransactionImages}"
                                Margin="{StaticResource PhoneMargin}">
    <telerikPrimitives:RadSlideView.ItemTemplate>
        <DataTemplate>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                 
                <Image Source="{Binding Image, Converter={StaticResource imageConverter}}" Stretch="Uniform" Tap="Image_Tap"/>
                <TextBlock Grid.Row="1" Text="{Binding Note}" TextWrapping="Wrap"/>
            </Grid>
        </DataTemplate>
    </telerikPrimitives:RadSlideView.ItemTemplate>
</telerikPrimitives:RadSlideView>
<telerikPrimitives:RadPaginationControl Grid.Row="2"
                                        PageProvider="{Binding ElementName=slideView}"
                                        DisplayMode="Thumbnails"
                                        NavigationMode="Direct">
    <telerikPrimitives:RadPaginationControl.ItemTemplate>
        <DataTemplate>
            <Image Source="{Binding Image, Converter={StaticResource imageConverter}, ConverterParameter=90}" Width="90" Height="90" Opacity="0.6"/>
        </DataTemplate>
    </telerikPrimitives:RadPaginationControl.ItemTemplate>
    <telerikPrimitives:RadPaginationControl.CurrentItemTemplate>
        <DataTemplate>
            <Border BorderThickness="3" BorderBrush="{StaticResource PhoneAccentBrush}">
                <Image Source="{Binding Image, Converter={StaticResource imageConverter}, ConverterParameter=90}" Width="90" Height="90"/>
            </Border>
        </DataTemplate>
    </telerikPrimitives:RadPaginationControl.CurrentItemTemplate>
    <telerikPrimitives:RadPaginationControl.ThumbnailListStyle>
        <Style TargetType="telerikPagination:PaginationThumbnailListControl">
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Bottom"/>
            <Setter Property="Margin" Value="12,24"/>
        </Style>
    </telerikPrimitives:RadPaginationControl.ThumbnailListStyle>
</telerikPrimitives:RadPaginationControl>



But when I'm deleting item from binded list which is ObservableCollection, I'm getting an exception

{System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.RadDataBoundListBox.SynchCheckedItemsOnItemsChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Controls.RadDataBoundListBox.OnItemsChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.Pagination.PaginationThumbnailListControl.OnOwnerSourceCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.RadPaginationControl.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
   at System.Collections.ObjectModel.Collection`1.Remove(T item)
   at MoneyWallet.View.TransactionImagesEditPage.<DeleteImage_Click>d__2.MoveNext()}

3 Answers, 1 is accepted

Sort by
0
Alexey
Top achievements
Rank 1
answered on 13 Nov 2014, 07:04 AM
Here is an example. Just change extension from PNG to ZIP
0
Ves
Telerik team
answered on 14 Nov 2014, 06:50 AM
Hi Alexey,

This is a bug and our developers are working on it. We will contact you to provide a build with a fix through the support ticket you have opened.

Please, accept our apologies for the inconvenience caused by this problem.

Anyone else experiencing the same issue, please open a formal support ticket, so that we can provide a hotfix.

Best regards,
Ves
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Eugene
Top achievements
Rank 1
answered on 15 Nov 2014, 05:13 PM
+1. Filed a support ticket.
Tags
PaginationControl
Asked by
Alexey
Top achievements
Rank 1
Answers by
Alexey
Top achievements
Rank 1
Ves
Telerik team
Eugene
Top achievements
Rank 1
Share this question
or