locked
How does Lightswitch decide when to enable the Save button on the screen command bar? RRS feed

  • Question

  • I have one screen where the Save button appears to enable when I update entities in the VisualCollection.  

    On another screen, I do the same thing, but the button does not enable.  Lightswitch pops up an asterisk however to indicate unsaved data.  

    This seems inconsistent.  

    Does anybody know why? 


    Monday, May 27, 2013 4:35 AM

Answers

  • There is a property on each screen that indicates if the screen is a browse or edit screen. Setting this to edit should help.

    Patrick Baker (Visual Studio LightSwitch Test Lead)

    • Proposed as answer by ADefwebserver Thursday, May 30, 2013 1:28 AM
    • Marked as answer by Angie Xu Thursday, June 6, 2013 12:56 AM
    • Unmarked as answer by Yann DuranModerator Thursday, June 6, 2013 10:43 AM
    • Marked as answer by PepperoniOnly Monday, June 17, 2013 1:24 AM
    Wednesday, May 29, 2013 3:39 PM
    Moderator

All replies

  • It appears part of it at least is whether the changes to the visual collection validate.  Mine apparently do not validate, but the validation exception does not appear to contain any info on the reason.  Is there some trick to interpreting the validation exceptions?
    Monday, May 27, 2013 5:10 AM
  • I've now fixed my validation error (wrong cardinality on one of the relationships), but the Screen save button still does not enable.  I can save the changes however if I close the screen - I get the prompt about discarding or saving, and choose save.
    Monday, May 27, 2013 5:23 AM
  • There is a property on each screen that indicates if the screen is a browse or edit screen. Setting this to edit should help.

    Patrick Baker (Visual Studio LightSwitch Test Lead)

    • Proposed as answer by ADefwebserver Thursday, May 30, 2013 1:28 AM
    • Marked as answer by Angie Xu Thursday, June 6, 2013 12:56 AM
    • Unmarked as answer by Yann DuranModerator Thursday, June 6, 2013 10:43 AM
    • Marked as answer by PepperoniOnly Monday, June 17, 2013 1:24 AM
    Wednesday, May 29, 2013 3:39 PM
    Moderator
  • @Angie - while there's no doubt that Patrick's information is correct, we have absolutely no idea if it helps the OP at all, we certainly don't know if it answers their question.

    Please don't mark answers as a reply, simply because someone has proposed it (including replies that I propose myself), unless you know it to actually be the answer from your own experience, or it's absolutely obvious that it answers the question.


    Yann Duran
         - Co-Author of Pro Visual Studio LightSwitch 2011
         - Author of the  LightSwitch Central Blog

    FREE Download: Luminous Tools for LightSwitch
    (a Visual Studio productivity extension for LightSwitch)
     
    Click Mark as Answer, if someone's reply answers your question
    Click  Vote as Helpful, if someone's reply is helpful
     
    By doing this you'll help everyone find answers faster.

    Thursday, June 6, 2013 10:47 AM
    Moderator
  • Thanks Patrick, this did the trick.
    Monday, June 17, 2013 1:24 AM
  • Thanks for coming back to mark the answer to your question.

    A suggestion: if you're asking questions about the HTML client, it's probably a good idea to include that in the title, or at least in the body of the question.


    Yann Duran
         - Co-Author of Pro Visual Studio LightSwitch 2011
         - Author of the  LightSwitch Central Blog

    FREE Download: Luminous Tools for LightSwitch
    (a Visual Studio productivity extension for LightSwitch)
     
    Click Mark as Answer, if someone's reply answers your question
    Click  Vote as Helpful, if someone's reply is helpful
     
    By doing this you'll help everyone find answers faster.

    Monday, June 17, 2013 4:48 AM
    Moderator