I want to bind the count of datasource(itemsource) for xamGrid in Page style. So tried in this way:
Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Cell.Row.Manager.Rows.Count}"
but that is the number of rows in one page, same as pagesize, not the total count of datasource.
What's the right path for this case?
Or if xamGrid dataContext is viewmodel which has a property say TotalCount, how to bind it to a textbox in PageStyle?
Hello,
I have tested the sample application that I attached with my previous post with PagedCollectionView and it seems to work as it supposed to. The Count property of the PagedCollectionView gets the amount of the records which are currently in view. When I change the items source of my application to PagedCollecitonVeiw and use the binding you mentioned I get “20” in the TextBlock. In order to show the count of all the records you can use TotalItemCount property instead. The TextBlock will look like this:
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="16"
Text="{Binding
RelativeSource={RelativeSource TemplatedParent},
Path=Parent.Owner.Grid.ItemsSource.TotalItemCount,
StringFormat='There are {0:N0} Rows in the XamGrid'}"/>
If you have any further questions please do not hesitate to ask.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
I want to display summary like below:
Displaying X through Y out of Z records.
e.g on first page,it will show
Displaying 1 through 25 out of 29 records.
considering pageSize set to 25.
and on second page it will show
Displaying 26 through 29 out of 29 records.
Please suggest.