I can’t get paging to work in my DataGrid even though I set AllowPaging="true" and AllowCustomPaging="true"

It was working earlier but now I don’t know what happened.
What do I need to change in order to make it work?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I had to set
datagrid1.VirtualItemCount, as explained on msdn – DataGrid.VirtualItemCount, to the actual number of items in my data source sinceCustomPagingdoes not work without it.So I added
and it worked.