Aug
8
Written by:
Michael Washington
8/8/2014 4:25 AM
The new book that covers Visual Studio LightSwitch and Cloud Business Apps in Visual Studio 2013 has been released. Visual Studio LightSwitch 2013 is a development tool that provides the easiest and fastest way to create forms over data, line of business applications and build applications for the desktop and the internet cloud by providing a tool that allows you to quickly and easily define and connect to your data, program your security and business rules, expose this via OData to practically any client such as mobile devices and web pages.
This book will demonstrate its use, explain, and provide examples of important concepts of its API (Application Programming Interface).
For more information see:
http://lightswitchhelpwebsite.com/Market/Books/CreatingWebPages2013.aspx
11 comment(s) so far...
Hi Michael! I've just bought your book. Is the source code available for download? Best regards, Copr
By Ciro on
8/9/2014 3:58 PM
|
@Ciro - All files are on the Downloads page: http://lightswitchhelpwebsite.com/Downloads.aspx
By Michael Washington on
8/9/2014 3:58 PM
|
Hi Michael I've just bought your book Great Book :)
I have a question I need to hide/display some fields based on another field (Field called Type) in the AddEdit Screen I know how to do it when user select value form combo box for that field.
But how do I set the fields when the screen is opened and loaded with data ?
I have created a function that hide/display then fields "SetTypeDisplayField". I call it as you can see using the addChangeListener. but when I open a record with data that addChangeListener is not fire. and if I try to call SetTypeDisplayField in myapp.AddEditField.created it seem that there is no data yet in the Type field (it is probably loaded async)
here is my code: myapp.AddEditField.created = function (screen) { // Write code here. screen.Field.addChangeListener("Type", function (e) { var field = screen.Field var contenctItem = screen.findContentItem("Type");
if (field.Type != undefined) { SetTypeDisplayField(screen, contenctItem.value); } }); };
Thanks Doron
By doron on
8/25/2014 4:15 AM
|
@doron - Unfortunately the comments section in the blog is a lousy place to answer questions and provide code samples. The best place to get help with questions is the official LightSwitch forums at: http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=lightswitch
By Michael Washington on
8/25/2014 1:52 PM
|
found the solution is:
screen.getField().then(function success() { SetTypeDisplayField(screen, screen.Field.Type); })
By Doron on
8/25/2014 1:52 PM
|
Hi, Michael
On page 242, a null parameter is missing ( myapp.showAddNewPatient(null,{.... ) . Here is the fixed code:
myapp.BrowsePatients.myAddNewPatient_execute = function (screen) { // Open the AddNewPatient Screen myapp.showAddNewPatient(null,{ beforeShown: function (addEditPatientScreen) { // Create new Patient here so that discard will work var newPatient = new myapp.Patient; addEditPatientScreen.Patient = newPatient; },
afterClosed: function (addEditPatientScreen, navigationAction) { // Refresh Patients screen.Patients.load(); } }); };
Best regards,
By Ciro on
9/5/2014 2:16 PM
|
@Ciro - Thank you for the feedback. While it is preferable for you to pull in the null, you can download the code (from the download page) and see that the code still works.
By Michael Washington on
9/5/2014 2:17 PM
|
WERE DO I BUY THE BOOK AM IN SOUTH AFRICA,,PLEASE HELP,,AM A BEGINNER
By CYRIL on
12/1/2014 6:58 AM
|
@CYRIL - Please see this page for multiple ordering options: http://lightswitchhelpwebsite.com/Market/Books/CreatingWebPages2013.aspx
By Michael Washington on
12/1/2014 9:58 AM
|
I am in Ghana and wants to purchase the E-books. Ghana is not in the country list. how do i buy?
By Edem Akoussanh on
9/3/2015 12:42 PM
|
@Edem Akoussanh - I am sorry but Amazon Kindle or physical book is the only other way.
By Michael Washington on
9/3/2015 12:42 PM
|