Pagination in Detail and Edit View

Hi,

I have developed custom module using code, I’m trying to set pagination in Detail and Edit view as same like default. Can anyone guide me to set pagination in custom code.