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

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

1 Answer 108 Views
This is a migrated thread and some comments may be shown as answers.
Jason Nguyen
Top achievements
Rank 1
Jason Nguyen asked on 14 Jul 2010, 03:36 PM
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

1 Answer, 1 is accepted

Sort by
Rossen Hristov
Telerik team
answered on 19 Jul 2010, 10:07 AM
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
Asked by
Jason Nguyen
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question