Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Lightswitch

Posted on 2014-02-19
4
Medium Priority
?
312 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 630 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

722 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