locked
Sorting a SingleOrDefault control RRS feed

  • Question

  • Hi

    I have a "Chains" and a "Stores" table.

    In one screen I use a SingleOrDefault "Chains" query as a drop-list selector to display Stores in the selected Chain.

    But the Chains in the drop-list are not in ascending alpha order because with the SingleOrDefault query I am unable to add sorting.

    I tried adding a "ChainsByName" query (Chains sorted by name) to the screen but I don't have a SingleOrDefault option as I do for "Chains" so this doesn't appear to be a solution.

    Does anyone know how this is done?

    Thanks, Mark.


    Mark

    Monday, February 17, 2014 7:21 AM

Answers

  • Hi Mark,

    Have you tried editing the properties of the 'Chains' screen content item (Details Modal Picker) and choosing your "ChainsByName" screen collection property as the "Choices:" rather than "Auto"?


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    • Proposed as answer by Xpert360 Monday, February 17, 2014 11:16 AM
    • Marked as answer by ITPSB Monday, February 17, 2014 2:52 PM
    Monday, February 17, 2014 10:23 AM

All replies

  • Hi Mark,

    Have you tried editing the properties of the 'Chains' screen content item (Details Modal Picker) and choosing your "ChainsByName" screen collection property as the "Choices:" rather than "Auto"?


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    • Proposed as answer by Xpert360 Monday, February 17, 2014 11:16 AM
    • Marked as answer by ITPSB Monday, February 17, 2014 2:52 PM
    Monday, February 17, 2014 10:23 AM
  • Hi Dave

    Many thanks yet again.

    I should have been able to figure it out but didn't quite make it.

    All the best

    Mark


    Mark

    Monday, February 17, 2014 2:53 PM