Articles → LIGHT SWITCH 2011 → Programmer Created Detail Screen Vs Lightswitch Generated Detail Screen In Lightswitch 2011

Programmer Created Detail Screen Vs Lightswitch Generated Detail Screen In Lightswitch 2011






Software Requirement




  1. Visual studio 2010 is installed on your machine.
  2. Visual Studio 2010 service pack 1 is installed on your machine.
  3. Microsoft Visual Studio Light switch 2011 is installed on your machine.

Prerequisite Knowledge




  1. How to add tables in lightswitch application?
  2. What are the different types of screens in lightswitch?
  3. How to add screens in lightswitch application?
  4. What is screen’s saved event and when it gets called?

Steps For Execution




  1. Creation of new project.
  2. Creation of new table.
  3. Creation of new screens.
  4. Call both types of screens one by one in screen’s saved event.




Picture showing the project structure of the lightswitch application
Click to Enlarge



Picture showing the city table in the lightswitch table designer
Click to Enlarge



  1. Create new screen
  2. Details screen


Picture showing a pop up window for adding a new screen
Click to Enlarge



Picture showing the project structure after adding the new screen
Click to Enlarge



partial void CreateNewCity_Saved() {
  // Write your code here.
  this.Close(false);
  Application.Current.ShowDefaultScreen(this.CityProperty);
}




Picture showing the default detail screen when the record is saved
Click to Enlarge



partial void CreateNewCity_Saved() {
  // Write your code here.
  this.Close(false);
  Application.Current.ShowCityDetail(this.CityProperty.Id);
}




Picture showing the user defined detail screen when the record is saved
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, September 26, 2012

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250