Created
March 27, 2013 07:07
-
-
Save 40/5252342 to your computer and use it in GitHub Desktop.
go to last line of listview - bb10 cascades
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| how do i obtain the number of elements from dataModel? | |
| It depends on dataModel type which you are using, consult the docs of corresponding classes. | |
| For ArrayDataModel and GroupDataModel: | |
| var n = dataModel.size() // or dataModel.childCount(0) - number of children in first section | |
| indexPath is an array where the first number is section and the second one is row in section. | |
| Something like this should work: | |
| var dataModelSize = listViewId.dataModel.size(); // or listViewId.dataModel.childCount(0) | |
| if (dataModelSize > 0) | |
| { | |
| var lastRowNumber = dataModelSize - 1 | |
| listViewId.scrollToItem([0, lastRowNumber], ScrollAnimation.Default); | |
| } | |
| Replace the listViewId with id of your ListView. | |
| If this won't work, please paste your current code and the errors which appear in logs (if any). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment