Mobile Entree Community
»
Technical Support
»
General Q&A
»
How to create pager
|
|
Rank: Active Member
Joined: 7/20/2010 Posts: 13 Points: 39 Location: usa
|
I tried to create pager using following code. But click event is not firing for the ext and previous button.
EntreeListItemPager pager = lGrp.AddListItem<EntreeListItemPager>(); pager.ShowNextButton = (currentpage == totalpages) ? false : true; pager.ShowPreviousButton = (currentpage == 1) ? false : true; int pagestart = ((currentpage - 1) * 10) + 1; int pageend = ((currentpage * 10) > totalpages) ? totalpages : (currentpage * 10); pager.Status = pagestart.ToString() + "-" + pageend.ToString();
EntreeActionItem nextaction = pager.AddAction(); nextaction.Position = EntreeScreenPosition.Right; EntreeClickActionObject next = output.CreateClickAction(); next["screen"] = "Contacts"; next["currentpage"] = (currentpage + 1).ToString(); next["search"] = TheInput.Value; next.SlideDirection = EntreeScreenSlideDirection.Forward; nextaction.SetClickAction(next); pager.SetClickAction(next);
EntreeActionItem previous = pager.AddAction(); previous.Position = EntreeScreenPosition.Left; EntreeClickActionObject previousclick = output.CreateClickAction(); previousclick["screen"] = "Contacts"; previousclick["currentpage"] = (currentpage + 1).ToString(); previousclick["search"] = TheInput.Value; previousclick.SlideDirection = EntreeScreenSlideDirection.Back; pager.SetClickAction(previousclick); previous.SetClickAction(previousclick); pager.PreviousActionItem = nextaction; pager.PreviousActionItem = previous;
Thanks for reply
|
|
Rank: Active Member
Joined: 7/20/2010 Posts: 13 Points: 39 Location: usa
|
It was my mistake.
I modified code to following and its working now
EntreeListItemPager pager = lGrp.AddListItem<EntreeListItemPager>(); pager.ShowNextButton = (currentpage == totalpages) ? false : true; pager.ShowPreviousButton = (currentpage == 1) ? false : true; int pagestart = ((currentpage - 1) * 10) + 1; int pageend = ((currentpage * 10) > totalpages) ? totalpages : (currentpage * 10); pager.Status = pagestart.ToString() + "-" + pageend.ToString();
EntreeActionItem nextaction = pager.NextActionItem ; nextaction.Position = EntreeScreenPosition.Right; EntreeClickActionObject next = output.CreateClickAction(); next["screen"] = "Contacts"; next["currentpage"] = (currentpage + 1).ToString(); next["search"] = TheInput.Value; next.SlideDirection = EntreeScreenSlideDirection.Forward; nextaction.SetClickAction(next); pager.SetClickAction(next);
EntreeActionItem previous = pager.PreviousActionItem; previous.Position = EntreeScreenPosition.Left; EntreeClickActionObject previousclick = output.CreateClickAction(); previousclick["screen"] = "Contacts"; previousclick["currentpage"] = (currentpage + 1).ToString(); previousclick["search"] = TheInput.Value; previousclick.SlideDirection = EntreeScreenSlideDirection.Back; pager.SetClickAction(previousclick); previous.SetClickAction(previousclick);
|
|
|
Guest |
Mobile Entree Community
»
Technical Support
»
General Q&A
»
How to create pager
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
|
Main Forum RSS : 
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.