Articles → LIGHT SWITCH 2011 → Bind grid with view in lightswitch 2011

Bind grid with view in lightswitch 2011




























Software requirement











Prerequisite knowledge













Steps for execution























Create a new lightswitch project





Click to Enlarge


Create tables





Click to Enlarge


Click to Enlarge


Adding data in the tables





Click to Enlarge


Click to Enlarge


Add data source in lightswitch





Click to Enlarge




Click to Enlarge




Click to Enlarge














Click to Enlarge




Click to Enlarge


Add view in the database




CREATE VIEW vw_GetEmployeeData AS 
SELECT 
  e.EmployeeId, 
  e.EmployeeName, 
  d.DepartmentName 
FROM 
  Employee e 
  INNER JOIN Department d ON e.DepartmentId = d.DepartmentId



Update data source







Click to Enlarge




Click to Enlarge




Click to Enlarge




Click to Enlarge


Add new screens





Click to Enlarge




Click to Enlarge


Output





Click to Enlarge


Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, November 28, 2012

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250