I have created a custom template for columnlayout pagercontrol as below:
<Style x:Key="CustomNestedPagerStyle1" TargetType="igPrim:PagerCellControl"> <Setter Property="Background" Value="{StaticResource PagerAreaBackground}"/> <Setter Property="BorderBrush" Value="{StaticResource CellItemNormalBorderBrush}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="igPrim:PagerCellControl"> <Grid Background="{TemplateBinding Background}"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="Orientation"> <VisualState x:Name="Top"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="pagerStroke" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="pagerStroke" Storyboard.TargetProperty="VerticalAlignment"> <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Bottom" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Bottom"> <Storyboard > <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="pagerStroke" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Border x:Name="pagerStroke" Height="1" VerticalAlignment="Top" Background="{TemplateBinding BorderBrush}" Visibility="Collapsed"/> <TextBlock x:Name="RowCount" Grid.Column="0" Height="30" Margin="0,7,0,0" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding ElementName=txtNestedFLCount,Path=Text}" /> <igPrim:PagerControl x:Name="PagerItemControl" Grid.Column="1" > <igBase:Commanding.Commands> <ig:XamGridPagingCommandSource EventName="FirstPage" CommandType="FirstPage" > </ig:XamGridPagingCommandSource> <ig:XamGridPagingCommandSource EventName="LastPage" CommandType="LastPage" > </ig:XamGridPagingCommandSource> <ig:XamGridPagingCommandSource EventName="PreviousPage" CommandType="PreviousPage" > </ig:XamGridPagingCommandSource> <ig:XamGridPagingCommandSource EventName="NextPage" CommandType="NextPage" > </ig:XamGridPagingCommandSource> <ig:XamGridPagingCommandSource EventName="GoToPage" CommandType="GoToPage" > </ig:XamGridPagingCommandSource> </igBase:Commanding.Commands> </igPrim:PagerControl> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>
Where "RowCount" textblock will show calculated value of rows from code behind.
But problem with this approach is that once the row is expanded ,it shows correct count on its pagercontrol but pager text on previously expanded rows also gets updated with this new value.
Hello Bharath,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post, but it seems like I am missing something about it, because I cannot be sure how your data is organized and what are the calculations you make in code behind and how you bind them to the TexBlock in the Pager, so if this is still an issue for you, could you please send me an isolated sample project, where this is reproduced, so I can investigate it further for you.
Feel free to write me if you have further questions.