Using pagination option in DataGrid control. We have to set the number of records for a page, then it takes care of pagination by itself.