Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Lightswitch

Posted on 2014-02-19
4
Medium Priority
?
318 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
  • 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
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.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview
Suggested Courses

916 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