I'm developing a mobile web application in ASP.NET mobile using Visual Studio 2005 (2008 broke a lot of support for mobile app dev, but that's a story for another post).
I have about 7 forms in total and they each have a <mobile:list> control on the page.
I'm populating the list control using the code behind page and a
dynamically populated collection of MobileListItems
(System.Collections.Generic.List<MobileListItem>)
// Execute the query to get a dataset with the types for this vendor
System.Collections.Generic.List typesList = EquipmentRepository.getTypeList(sessionUser.VendorID, "en");
// Add the items to the control
foreach (MobileListItem i in typesList)
{
typeList.Items.Add(i);
} The problem I'm having is with pagination. I've set the Paginate=True property of the parent <mobile:form>, and also set the relevant ItemCount, ItemsPerPage variables on the mobile list control (in this case I'm displaying 5 items per page). Pagination works, but the only navigation options I get are Previous, Next there is no First / Last buttons to jump to the respective pages and continuously pushing the Next navigation never actually yields the end of the list. You can push Next forever and the list just keeps on paging.
I've read the documentation on the Mobile:List control at the MSDN site, but I can't seem to find anything regarding jumping to the first / last page in a list, and to prevent this "endless looping" while clicking the next button. The Collection of MobileListItems has a finite number of items so I'm not sure what else could be the problem.
On another related note, pagination in mobile:list controls does not work properly when testing on a Blackberry device. (8830 Emulator and MDS Emulator being used) This is somewhat of a snag, but I'd rather actually get the pagination working properly first and then debug the Blackberry issue separately.
Anyone have any thoughts on these problems?