locked
How to sort a Platform Vector or ListView-Items

    Question

  • Hello,

    is there a way to sort a Platform Vector or do i have do use std::vector and then copy it to a Platform Vector? (the vector holds String^)?

    Another question. Is there an easy way to sort a ListView either using c++/cx or using XAML after or before ListView->Items->Append(...) was used?

    thanks for your help!

    Tuesday, May 07, 2013 6:53 PM

Answers

  • Not directly.

    The typical way to sort a ListView is to bind it to a sorted collection.

    --Rob

    • Marked as answer by Jesse Jiang Tuesday, May 14, 2013 2:08 AM
    Wednesday, May 08, 2013 5:14 AM
    Owner

All replies

  • Not directly.

    The typical way to sort a ListView is to bind it to a sorted collection.

    --Rob

    • Marked as answer by Jesse Jiang Tuesday, May 14, 2013 2:08 AM
    Wednesday, May 08, 2013 5:14 AM
    Owner
  • I am using PasswortVault Resource names to display the resource names as Items in a ListView.

    So do I really need to copy the PasswortVault resourcenames to a std::vector, sort it and then convert it back to a String^ to append them sorted to the list view? 

    Is there no better solution for this? Thanks!

    David

    Wednesday, May 08, 2013 2:52 PM