locked
LS HTML Client Control Visible? RRS feed

  • Question

  • VS2012.2 LightSwitch HTML Client

    I need to make some controls visible conditionally based on the user changing the options.

    Say the user selects HasStudentLoans to true.. I need to show the Groupbox that contains those questions.

    I've used KnockOutJs for this in MVC application but then I'm writing the HTML.
    (How does LS name controls??)

    How can I bind the visible property of a control to another control on the same page?

    Thanks


    Pat Tormey PE MVP, Client App Dev, NH USA

    Wednesday, June 12, 2013 2:28 PM

All replies

  • The LightSwitch HTML way will be something like this:

    screen.findContentItem("OrderDate").isVisible = false;

    ... where 'OrderDate' is the field you want to hide.

    Cheers


    Dave Baker | Xpert360 blog | twitter : @xpert360 | Xpert360 website Opinions are my own. For better forums, please mark as helpful/answer, if it helps/solves your problem.

    • Proposed as answer by Angie Xu Wednesday, June 26, 2013 8:47 AM
    Wednesday, June 12, 2013 3:50 PM