Posts

Showing posts with the label implementation

How to implement custom paging on a WPF DataGrid?

Image
In this post we are going to learn the pagination in the data grid where we will have options to select the number of records to be displayed per page in the data grid. you can select the count from the record per page combobox and based on that you can see the records. I will add the four buttons which is used for show the first page, previous page, next page and last page. Below is DataGrid control code:  <DataGrid Grid.Row="1" ItemsSource="{Binding EmployeeCollection}"                    AutoGenerateColumns="False" CanUserAddRows="False">             <DataGrid.Columns>                 <DataGridTextColumn Header="ID" Binding="{Binding ID}"/>                 <DataGridTextColumn Header="Name" Binding="{Binding Name}"/>                 <DataGridTextColumn Header="Age" Binding="{Binding Age}"/>                 <DataGridTextColumn Header="Gender"