locked
DisplayMemberPath for AutocompleteBox? RRS feed

  • Question

  • Is there any way to specify the display path (DisplayMemberPath for those that know wpf autocomplete box) for the autocomplete box in lightswitch.  Right now, my lightswitch application is displaying the "Id" field vaule instead of the "Description" field value.  I am able to display the correct values in the drop down itself.  However after selection, the "Id" value shows in the datagrid instead of the "Description".
    Monday, December 10, 2012 9:54 PM

Answers

  • The ACB will display whichever property is designated as the Summary property in the table designer. By default, this will be the first string property in the table.

    Is this an attached database with a string PK?


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    • Marked as answer by GateHyperion Tuesday, December 11, 2012 6:28 PM
    Monday, December 10, 2012 11:57 PM
    Moderator

All replies

  • The ACB will display whichever property is designated as the Summary property in the table designer. By default, this will be the first string property in the table.

    Is this an attached database with a string PK?


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    • Marked as answer by GateHyperion Tuesday, December 11, 2012 6:28 PM
    Monday, December 10, 2012 11:57 PM
    Moderator
  • Thanks for the reply Yann,

    Yes this is a lookup table with a string PK posing as the Id field.  I am trying to make an admin dashboard for old application. Your solution worked.

    I was this close to giving up on lightswitch as a viable rapid development tool.  Thanks for the light at the end of the tunnel.

    Tuesday, December 11, 2012 6:28 PM
  • You're welcome! I'm so glad I was able to help you not give up on LightSwitch!

    Don't hesitate to ask, if you're having a problem. Often it just requires a little knowledge, & a slightly different way of looking at the problem.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Thursday, December 13, 2012 1:12 AM
    Moderator
  • I am using a external sql server datasource in lightswitch, so I don't get the summary property in the table designer, is there any other way I can change the display of the sellection after selecting it from the dropdownbox, I get the correct options when I try to sellect but afterwards it displays the wrong field, I would like to display my full name calculation
    Thursday, April 24, 2014 9:54 AM