Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Developing Windows Store Apps with HTML5 and JavaScript

You're reading from   Developing Windows Store Apps with HTML5 and JavaScript The Windows store is growing in popularity and with this step-by-step guide it's easy to join the bandwagon using HTML5, CSS3, and JavaScript. From basic development techniques to publishing on the store, it's the complete primer.

Arrow left icon
Product type Book
Published in Aug 2013
Publisher Packt
ISBN-13 9781849687102
Pages 184 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rami Sarieddine Rami Sarieddine
Author Profile Icon Rami Sarieddine
Rami Sarieddine
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Developing Windows Store Apps with HTML5 and JavaScript
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
1. HTML5 Structure FREE CHAPTER 2. Styling with CSS3 3. JavaScript for Windows Apps 4. Developing Apps with JavaScript 5. Binding Data to the App 6. Making the App Responsive 7. Making the App Live with Tiles and Notifications 8. Signing Users in 9. Adding Menus and Commands 10. Packaging and Publishing 11. Developing Apps with XAML Index

Sorting and filtering the data


We got the data and we used templates to display it and bind it to the WinJS control. Now, what if we need to sort the data items or even filter out unwanted items based on a certain criterion? The binding list API provided by the WinJS library handles this seamlessly using built-in methods such as createSorted and createFiltered. If we go back to the code we wrote earlier to fetch the tweets and write the bindingList variable we created, which is an instance of WinJS.Binding.List, and try to call the method createSorted, you will notice the autocomplete feature lists the other two built-in functions provided for this functionality, as shown in the following screenshot:

These two methods will create a view over its data called "sorted projection". The createSorted method will return a SortedListProjection object, which represents a sorted view over the data it holds, and similarly the createFiltered method will return a FilteredListProjection object representing...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime