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?
I had to set datagrid1.VirtualItemCount
, as explained on msdn – DataGrid.VirtualItemCount , to the actual number of items in my data source since CustomPaging
does not work without it.
So I added
datagrid1.VirtualItemCount = 200;
and it worked.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.