GridView Pagination Issue

2 posts, 0 answers
  1. Anand
    Anand avatar
    12 posts
    Member since:
    Apr 2014

    Posted 21 Oct 2014 Link to this post

    I ve a grid View 

    <telerik:RadGridView x:Name="RouteGridView" HorizontalAlignment="Stretch"
                                 HorizontalContentAlignment="Stretch"
                                 VerticalAlignment="Stretch"
                                 Grid.Column="0"
                                 Grid.Row="1"
                                 GroupRenderMode="Flat"
                                 CanUserFreezeColumns="False"
                                 CanUserReorderColumns="False"
                                 ItemsSource="{Binding ElementName=RoutesDataPager ,Path=PagedSource}"
                                 AutoGenerateColumns="False"
                                 RowIndicatorVisibility="Collapsed"
                                 SelectedItem="{Binding SelectedRowsItems,Mode=TwoWay}">
                                    <telerik:RadContextMenu.ContextMenu>
                                        <telerik:RadContextMenu>
                                            <telerik:RadMenuItem Header="Show History" Command="{Binding ShowRowHistoryCommand}">
                                                <i:Interaction.Behaviors>
                                                    <behaviour:SetRowDataContextCommandParameterBehavior />
                                                </i:Interaction.Behaviors>
                                            </telerik:RadMenuItem>
                                            <telerik:RadMenuItem Header="Supporting Items"
                                                                 ItemsSource="{Binding SupportingItemContextMenuItems}"
                                                                 ItemContainerStyle="{StaticResource SupprotItemsMenuItemContainer}" Command="{Binding SupportingItemsForRoutesCommand}">
                                                <!--<i:Interaction.Behaviors>
                                                    <behaviour:SetRowDataContextCommandParameterBehavior />
                                                </i:Interaction.Behaviors>-->
                                            </telerik:RadMenuItem>
                                        </telerik:RadContextMenu>
                                    </telerik:RadContextMenu.ContextMenu>
                                    <!--  Command="{Binding SupportingItemsForRoutesCommand}"
                                 util:GridViewHeaderMenu.IsEnabled="True"<telerik:RadContextMenu.ContextMenu>
                                        <telerik:RadContextMenu x:Name="RoutesTableRightClickContextMenu"
                                                                ItemsSource="{Binding RoutesRightContextMenuItems,Mode=TwoWay}">
                                             
                                        </telerik:RadContextMenu>
                                    </telerik:RadContextMenu.ContextMenu>-->
                                    <telerik:RadGridView.Columns>
                                        <!--<telerik:GridViewColumn>
                                            <telerik:GridViewColumn.Header>
                                                <StackPanel>
                                                    <TextBlock Text="Actions"></TextBlock>
                                                </StackPanel>
                                                         
                                            </telerik:GridViewColumn.Header>
                                            <telerik:GridViewColumn.CellTemplate>
                                                <DataTemplate>
                                                    <StackPanel Orientation="Horizontal">
                                                        <HyperlinkButton Margin="2">
                                                            <Image Source="../../Assets/Images/map-extent-icon.png"
                                                                Cursor="Hand"
                                                                Stretch="None"  />
                                                        </HyperlinkButton>
                                                        <HyperlinkButton  Margin="2"  NavigateUri="{Binding RvlUrl}" TargetName="_blank">
                                                        <Image Source="../../Assets/Images/rvl-icon.png"
                                                                Cursor="Hand"
                                                                Stretch="None"  />
                                                        </HyperlinkButton>
                                                        <HyperlinkButton  Margin="2" NavigateUri="http://www.google.com" TargetName="_blank">
                                                            <Image Source="../../Assets/Images/google-map-icon.png"
                                                                Cursor="Hand"
                                                                Stretch="None" />
                                                        </HyperlinkButton>
                                                    </StackPanel>
                                                </DataTemplate>
                                            </telerik:GridViewColumn.CellTemplate>
                                        </telerik:GridViewColumn>-->
                                        <telerik:GridViewDataColumn Header="Actions">
                                            <!--<telerik:GridViewDataColumn.Header>
                                                <TextBlock Text="Actions"></TextBlock>
                                            </telerik:GridViewDataColumn.Header>-->
                                            <telerik:GridViewDataColumn.CellTemplate>
                                                <DataTemplate>
                                                    <StackPanel Orientation="Horizontal">
                                                        <HyperlinkButton Margin="2">
                                                            <Image Source="../../Assets/Images/map-extent-icon.png"
                                                                Cursor="Hand"
                                                                Stretch="None"  />
                                                        </HyperlinkButton>
                                                        <HyperlinkButton  Margin="2"  NavigateUri="{Binding RvlUrl}" TargetName="_blank">
                                                            <Image Source="../../Assets/Images/rvl-icon.png"
                                                                Cursor="Hand"
                                                                Stretch="None"  />
                                                        </HyperlinkButton>
                                                        <HyperlinkButton  Margin="2" NavigateUri="http://www.google.com" TargetName="_blank">
                                                            <Image Source="../../Assets/Images/google-map-icon.png"
                                                                Cursor="Hand"
                                                                Stretch="None" />
                                                        </HyperlinkButton>
                                                    </StackPanel>
                                                </DataTemplate>
                                            </telerik:GridViewDataColumn.CellTemplate>
                                        </telerik:GridViewDataColumn>
                                        <telerik:GridViewDataColumn Header="LINK" DataMemberBinding="{Binding RvlUrl}"
                                                                    IsReadOnlyBinding="{Binding DataContext.IsActive, RelativeSource={RelativeSource AncestorType=UserControl}}"
                                                                    IsReadOnly="True"/>
                                        <telerik:GridViewDataColumn Header="Year" DataMemberBinding="{Binding Hpmsyear}"
                                                                    IsReadOnlyBinding="{Binding DataContext.IsActive, RelativeSource={RelativeSource AncestorType=UserControl}}"
                                                                    IsReadOnly="True"/>
                                        <telerik:GridViewDataColumn Header="Routeid" DataMemberBinding="{Binding Routeid}"/>
                                        <telerik:GridViewDataColumn Header="Route Name" DataMemberBinding="{Binding Routename}" />
                                        <telerik:GridViewDataColumn Header="Begin Mile Point" DataMemberBinding="{Binding BegMp}"/>
                                        <telerik:GridViewDataColumn Header="End Mile Point" DataMemberBinding="{Binding EndMp}"/>
                                        <telerik:GridViewDataColumn Header="AADT" DataMemberBinding="{Binding Aadt}"
                                                                    IsReadOnlyBinding="{Binding DataContext.IsActive, RelativeSource={RelativeSource AncestorType=UserControl}}"
                                                                    IsReadOnly="True"/>
                                        <telerik:GridViewDataColumn Header="Updated By" DataMemberBinding="{Binding UserUpdated}"
                                                                    IsReadOnlyBinding="{Binding DataContext.IsActive, RelativeSource={RelativeSource AncestorType=UserControl}}"
                                                                    IsReadOnly="True"/>
                                        <telerik:GridViewDataColumn Header="Update Date" DataMemberBinding="{Binding Updt}"
                                                                    IsReadOnlyBinding="{Binding DataContext.IsActive, RelativeSource={RelativeSource AncestorType=UserControl}}"
                                                                    IsReadOnly="True"/>
                                        <telerik:GridViewDataColumn Header="Delete">
                                            <telerik:GridViewDataColumn.CellTemplate>
                                                <DataTemplate>
                                                    <StackPanel Orientation="Horizontal">
                                                        <HyperlinkButton Margin="2" Command="{Binding DataContext.DeleteRouteCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
                                                                         CommandParameter="{Binding DataContext.SelectedRowsItems,RelativeSource={RelativeSource AncestorType=UserControl}}">
                                                            <Image Source="../../Assets/Images/delete-red-icon.png"
                                                                Cursor="Hand"
                                                                Stretch="None"  />
                                                        </HyperlinkButton>
                                                    </StackPanel>
                                                </DataTemplate>
                                            </telerik:GridViewDataColumn.CellTemplate>
                                        </telerik:GridViewDataColumn>
                                    </telerik:RadGridView.Columns>
                                    <i:Interaction.Behaviors>
                                        <behaviour:SelectedSyncBehavior SelectedItems="{Binding SelectedRowsItems}" />
                                    </i:Interaction.Behaviors>
                                </telerik:RadGridView>
                                <telerik:RadDataPager HorizontalAlignment="Stretch"
                                  Grid.Row="2"
                                  Grid.Column="0"
                                  VerticalAlignment="Top"
                                  x:Name="RoutesDataPager"
                                  PageSize="25" FontSize="12"
                                  BorderThickness="1,0,1,1"
                                  Source="{Binding AllRoutesItemSource}"
                                  DisplayMode="All"/>


    When User make choice of Column & Filter and after this when user Delete the Row My Grid Data go Off & pagination shows only Page 1. this happens specially in case when After filter on 1 row is available.
    Later after a while when Click on Filtered Column Again I see all the values in it. If I select I m able to see data in grid but Paginaiton still have page 1 only.
    I've more then 20000 rows for this grid.

    How to resolve this issue ?
  2. Vera
    Admin
    Vera avatar
    263 posts

    Posted 23 Oct 2014 Link to this post

    Hello Anand,


    As it turns out, we are not able to reproduce the problem using the provided details. Could you please open a support ticket and send a simple runnable project demonstrating the issue?


    Regards,
    Vera
    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.

     
  3. DevCraft banner
Back to Top