In My app i have one dropdown which will have page sizes as (5,10,15,20...) like that. when user changes the page size i have to change the page size of grid.
Is it possible to rebind the data in such a way user doesn't know that page size has been changed means, i am able to rebind whole grid by refreshing the whole control. But is there any way to change the data in combobox selection change event.
And i have set the dropdown to default setting based on the user selected in previous session.
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically in the SelectionChanged event of the ComboBox with the size I set the XamGrid’s PageSize to the selected value. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Stefan,
I've implemented a similar solution in my application, but I wonder what would be the value for a "all records" / "no paging" behavior? Is it 0? Is it -1?
I'd like to add in the combobox another item with a value that would make the grid display all rows, like in no paging.
Thanks for your solution... but no thanks. I foresaw when I wrote my post that you would come up with this solution: setting the grid's pager settings to None. Unfortunately this doesn't fit my case.
In my case I need to keep visible the pager row (in your solution when you set to No paging page row disappears), because I've put my page size combobox in the pager row, next to pager cell.
Another ideea I have is to set the page size as big as the number of records in the grid's data source, but I haven't yet tested it and there might be issues with filters.
Hello Valeriu,
I have modified the sample I sent you before, so it has the functionality you want.