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

4 posts, 0 answers
  1. Alexey
    Alexey avatar
    21 posts
    Member since:
    Aug 2013

    Posted 12 Nov 2014 Link to this post

    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()}
  2. Alexey
    Alexey avatar
    21 posts
    Member since:
    Aug 2013

    Posted 13 Nov 2014 Link to this post

    Here is an example. Just change extension from PNG to ZIP
  3. DevCraft banner
  4. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 14 Nov 2014 Link to this post

    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.

     
  5. Eugene
    Eugene avatar
    7 posts
    Member since:
    May 2013

    Posted 15 Nov 2014 in reply to Ves Link to this post

    +1. Filed a support ticket.
Back to Top
DevCraft banner