locked
Alternatives to long dropdown selections in LS RRS feed

  • Question

  • I have an HTML lightswitch app with a screen that has two tables on it, in a typical one-to-many relationship.  When choosing a child record I have a dropdown with entries in it.

    Problem is, this app could have hundreds of possibilities in that child table and a dropdown that long isn't feasible.  Are there any articles on how to deal with this; perhaps click a link on the screen and have a popup appear in which I can search for a child entity and somehow use that as my selection?

    Tuesday, July 8, 2014 8:51 PM

Answers

  • Hi Jim,

    The details picker has autocomplete built-in.  So after you type 3 characters the options appear and are filtered to those that contain those chrs.

    Another option would to use two or more 'cascading' drop downs - using the first to narrow the results of the next.

    I havn't seen an y articles, but the serach screen that you suggest is possible.  You could use afterClosed callback to pass the selected entity to use as the value.

    HTH,

    Josh 

    • Marked as answer by jim bancroft Wednesday, July 9, 2014 12:02 AM
    Tuesday, July 8, 2014 10:14 PM

All replies

  • Hi Jim,

    The details picker has autocomplete built-in.  So after you type 3 characters the options appear and are filtered to those that contain those chrs.

    Another option would to use two or more 'cascading' drop downs - using the first to narrow the results of the next.

    I havn't seen an y articles, but the serach screen that you suggest is possible.  You could use afterClosed callback to pass the selected entity to use as the value.

    HTH,

    Josh 

    • Marked as answer by jim bancroft Wednesday, July 9, 2014 12:02 AM
    Tuesday, July 8, 2014 10:14 PM
  • Thanks Josh, I'll look into the afterClosed callback.  Sounds like a good alternative here.  I've heard of the cascading dropdowns alternative and believe Beth Massi has a few articles out there on it (example: http://blogs.msdn.com/b/bethmassi/archive/2012/01/12/creating-cascading-drop-down-lists-in-visual-studio-lightswitch.aspx)
    Wednesday, July 9, 2014 12:02 AM
  • Here's a cascading example in HTML client http://social.msdn.microsoft.com/Forums/vstudio/en-US/1aaed7d6-6fd8-472f-bd63-03b22992e6dd/how-to-call-clear-button-of-html-details-picker-control-programmaticaly?forum=lightswitch
    Wednesday, July 9, 2014 12:08 AM
  • An alternative approach can be to use a (existing) search screen for doing the selection:

    ERGONOMICALLY RE-USING SEARCH SCREEN IN THE LIGHTSWITCH HTML CLIENT PART 2/2


    paul van bladel

    Wednesday, July 9, 2014 7:25 AM