Solved

Lightswitch

Posted on 2014-02-19
4
300 Views
Last Modified: 2014-02-24
Hi Experts,

I'm developing a LightSwitch application.
I have and add/edit screen where I would like to disable a drop down list(combo box) if it is in edit mode.

I know how to disable a control. But just don't know how to do it only in edit mode .

 screen.findContentItem("mycombo").isEnabled = false;
0
Comment
Question by:MrStevenWin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
Jean Marie Geeraerts earned 210 total points
ID: 39871122
Hi, to know if your screen is used to edit/add a new entity. You can check the EntityState on the Property used in the screen.

The code would look something like:

screen.findContentItem("mycombo").isEnabled =  NameOfYourEntityProperty.Details.EntityState != EntityState.Added;

Open in new window

Where "NameOfYourEntity" would be the name of the entity you used to generate the screen.
0
 

Author Closing Comment

by:MrStevenWin
ID: 39873413
Below solved the issue. Thanks for your help!

myapp.AddEditLoanMaster.created = function (screen) {
    // Write code here.

   
    if (screen.myscreen.details.entityState != msls.EntityState.added) {
        screen.details.displayName = "Details Edit ";
        screen.findContentItem("mycontrol").isEnabled = false;
    }
 
};
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 39876249
You're welcome.
0
 

Author Comment

by:MrStevenWin
ID: 39882940
Hi Jerrith,

Could you pls. help me with my lightswitch question below?

www. experts-exchange .com/ Web_Development/WebApplications/Q_28372843.html

Thanks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question