Deleting items from GridView when using a DataPager causes items to temporarily disappear

2 posts, 0 answers
  1. Jason Nguyen
    Jason Nguyen avatar
    14 posts
    Member since:
    May 2010

    Posted 14 Jul 2010 Link to this post

    I am using a RadDataPager with a RadGridView and am allowing the user to delete entries in the RadGridView.

    Let's say I have two pages, and the PageSize is set to 10.  And let the first item on the second page be item x.
    Now say the user is on the first page and deletes an item.  The first page then goes down to 9 items and does not list item x.  Then if the user goes to the second page, item x isn't listed there either.  But as soon as one goes back to the first page, then item x is listed on the first page.

    Should item x have been automatically moved to the first page as soon as the deletion occurred?  If not, shouldn't item x still be listed on the next page?

    Thanks in Advance,
    Jason Nguyen
  2. Rossen Hristov
    Rossen Hristov avatar
    2478 posts

    Posted 19 Jul 2010 Link to this post

    Hello Jason Nguyen,

    We have logged this issue. We will try to resolve it as soon as possible. You can follow the PITS Issue by its ID: 2710

    We have updated your Telerik points for helping us identify this issue.

    Until we fix the issue, there is a very simple workaround. Simply wrap your original collection into a System.Windows.Data.PagedCollectionView. Then bind both the grid and the pager to this IPagedCollectionView. This will make everything work correctly.

    <UserControl x:Class="RadGridView_SL4_AR_1.MainPage"
                 mc:Ignorable="d" d:DesignHeight="700" d:DesignWidth="700">
            <my:MyViewModel x:Key="MyViewModel"/>
        <Grid x:Name="LayoutRoot"
              DataContext="{StaticResource MyViewModel}">
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto" />
            <telerik:RadGridView Grid.Row="0"
                                 ItemsSource="{Binding PagedClubs}"
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}"
            <StackPanel Grid.Row="1" Orientation="Horizontal">
                <telerik:RadDataPager Name="radDataPager"
                                      Source="{Binding PagedClubs}"

    public IPagedCollectionView PagedClubs
            if (this.pagedClubs == null)
                this.pagedClubs = new PagedCollectionView(this.Clubs);
            return this.pagedClubs;

    I have attached a sample project that does this.

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top