FAQ Database Discussion Community


DateTime TextBox in LightSwitch HTML increments one hour on save

visual-studio-lightswitch,lightswitch-2013
EDIT: Microsoft confirmed that this is a bug that will be addressed in the next release of lightswitch, < 2.5.3 (link) I have a simple LightSwitch HTML page with a DateTime TextBox that is databound to a SQL Server DateTime field (UTC +1). When the page is rendered, the correct...

Lightswitch using editable Grid which uses View as data source

c#,entity-framework,visual-studio-lightswitch
I am trying to develop a screen in Light-Switch, in which data shown is combined from 3 or 4 tables. But the Controls becomes read only for this view. I don't know how can I achieve this type of functionality in Light-Switch. Is is possible the make totally custom editable...

Updating a TextBox control's binding targets as PropertyChanged (keydown) in LightSwitch HTML clients

visual-studio-lightswitch,lightswitch-2013,lightswitch-2012
We're working with the Visual Studio LightSwitch HTML client and, in certain cases, we'd like to update the binding targets as the text is entered in the TextBox control rather than on the LostFocus of the control. This would work in a similar fashion to using the XAML UpdateSourceTrigger.PropertyChanged rather...

LightSwitch HTML Client: How to get the content/value of a custom control?

visual-studio-lightswitch
I made two Custom Controls named, "CustomControl_1" and "CustomControl_2". In the render function of "CustomControl_1", how to access the value of "CustomControl_2"? For example, myapp.BrowseOrders.CustomControl_2_render = function (element, contentItem) { $(element).text("Some Value"); }; myapp.BrowseOrders.CustomControl_1_render = function (element, contentItem) { $(element).text( Value of CustomControl_2 ? ); }; ...

Publishing Lightswitch localy

publish,visual-studio-lightswitch,iis-8.5
I'm trying to publish ligthswitch on local network with from VisualStudio 2013, I have installed IIS and launched web-deployment services. I Think I also installed all the possible features from web platform installer. When I publish lightswitch app I get to this screen. and I dont know how to get...

Does Lightswitch HTML support full-fledged web application development?

visual-studio-lightswitch
When LightSwitch first came out I was very intrigued by it, but after an initial evaluation, I learned that you couldn't build a complete browser-based business application with it using standards like HTML5, jQuery, CSS. It only supported Desktop apps with Silverlight and then when the HTML Client came out,...

Query in light switch returns only one line?

sql,views,visual-studio-lightswitch
I have a query which is called by two Parameters Invoice number & Company name. the query returns always one line in Light switch. Usually it should returns more than one line (Depends on what invoice number I am looking for). I donot know why its always returning one line...

build fails on LightSwitch: Duplicate items are not supported by the “Resource” parameter

c#,visual-studio-2013,visual-studio-lightswitch
As soon as I create a new LightSwitch Desktop Application (Not HTML) and Add a Data Source using an existing database in SQL Server, and build the project it fails and say The item "......\MyDataSource.csdl" was specified more than once in the "Resources" parameter and both items had the same...

How to use Open RIA Services packages from NuGet

wcf-ria-services,visual-studio-lightswitch,lightswitch-2013
I am an experienced developer trying to add a WCF RIA Services class library to a LightSwitch 2013 desktop app and I'm a little confused on how to get started... I know that Microsoft's WCF RIA Services will no longer be updated, it has been open-sourced and a newer version...

Lightswitch - Publish Greyed out in Configuration Manager

visual-studio-2013,publish,visual-studio-lightswitch,lightswitch-2013,lightswitch-2012
I am attempting to publish my Migrated VS2012 -> VS2013 lightswitch application. I had to upgrade my project after 2012 decided that auto-generating my new tables code was just too hard for it. 2013 worked the charm, everything went back up and I continued development and I could continue to...

How to reset a locked-out user's account

visual-studio-lightswitch
If a user enters the wrong password too many times (5 by default) then their account becomes locked and they are shown the following message: What do I, as an administrator, need to do to reset the account so that the user can log in again?...

LightSwitch HTML Client (VS2013 Update 4) - how to hide column programmatically?

visual-studio-lightswitch
Example: we have a VisualCollection of Customers, Customer has 3 fields of ID, Name, and FavoriteFood, all bound to columns in the table, but at runtime we might need to hide the FavoriteFood column based on the result of some other logic. I've been able to do a _postRender on...

Lightswitch HTML Client: How to re-render an item (re-execute postRender callback)

javascript,html,visual-studio,visual-studio-lightswitch
I am developing an lightswitch HTML client with Visual Studio 2013. I have a screen with a tile list of customers, where the ones that are marked as "premium" (which is a boolean field of the customer entity) are highlighted with an orange background, whereas all other customers stay in...

Static ComboBox in VS LightSwitch

c#,combobox,visual-studio-lightswitch
I have a screen in LightSwitch, which shows some data items. The User has the ability to Click on a button in Command Bar to start custom routines to print labels, do mail merge,... now what i want to achieve is: instead of directly running the routines for mail merge...

Out of the box Light Switch HTML app has a null error in IE9?

javascript,c#,visual-studio-2013,visual-studio-lightswitch,lightswitch-2013
I am trying LightSwitch for the first time, and after making a new HTML C# App - I tried to run it just to see what it looks like. IE9 freezes immediately and I get this error from Visual Studio 2013: Unhandled exception at line 5, column 19701 in http://localhost:49609/HTMLClient/Scripts/msls-2.5.1.min.js...

problems setting up money.js (for currency convertor)

javascript,c#,php,visual-studio-lightswitch,lightswitch-2013
Ive added the money.js to a Lightswitch application and have put this code on the execute of a button but I just get returned the value 100, can anyone see what im doing wrong here or some code I am missing, myapp.AddEquipmentToOrder.test_execute = function (screen) { var price = 100;...

How Does the Silverlight Client Talk to the Server in a 3 Tier Lightswitch Application?

c#,silverlight,visual-studio-lightswitch,3-tier,lightswitch-2012
I've picked up a legacy 3 tier Lightswitch application, and need to deploy it to a new server in my work. The client is a Silverlight application deployed to a file server where my clients can access it, and the Server is hosted on an IIS server. I've managed to...

Publish Llightswith Web app locally

visual-studio-2013,web-deployment,visual-studio-lightswitch,setup-deployment
I'm trying to publish Lightswitch app (web client) to local computer and local network location. Unfortunately all videos online only show how to deploy desktop app but not web.. My Lightswitch app connected to MS SQL server. SQl Server installed in on the same network but not on the local...

Images at Lightswitch v3.0: “Invalid URI: The Uri string is too long.”

mysql,visual-studio-2012,visual-studio-lightswitch
I got a simple Lightswitch - Silverlight based - web client. Client.csproj and Server.csproj are saying the LightSwitchVersion is v3.0. It runs on Visual Studio 2012 Update 4 LightSwitch Extensibility Toolkit for VS11 I have 2 extension, both are selected: LightSwitch Cosmopolitan Shell and Theme Microsoft LightSwitch Extensions And I...

Lightswitch HTML Client - set modal picker value when screen created

javascript,visual-studio-lightswitch,lightswitch-2013
ive done quite a bit of research into this now and non of the examples are helpful or apply. What I am trying to do is when the user loads the Add screen, I want the Details Picker to display a name when the screen is created rather than having...

How to change TextAlignment by code? LightSwitch 2013

javascript,visual-studio,visual-studio-2013,visual-studio-lightswitch
I'm building a program in LightSwitch 2013 (Visual Studio 2013). I have a textbox (that is ReadOnly) that it's text alignment is fixed to my language by default (not to English). I wrote a code in my program that check if the textbox has my language or English. I want...

Lightswitch task on a background thread

multithreading,background-process,visual-studio-lightswitch
I have a lightswitch app which sends an email when a new job is added. I added a sendemail helper class which is called when the record is inserted. This works however the interface hangs on save waiting for the email to be sent. I would like to perform this...

updating date via C# or JavaScript causes following error

javascript,c#,visual-studio-lightswitch,lightswitch-2013
I have recently discovered that when I update any date in Lightswitch HTML, whether it be in C# or JavaScript, that it causes the application to display this message: if i comment out anything that changes the date then this does not appear.. so my question is has anyone else...

Execute Stored Procedure using current LightSwitch ConnectionString

c#,visual-studio-lightswitch
I am trying to execute a stored procedure in a custom WebForm on my HTML LS Web Application, but i want to use the same ConnectionString that serverContext does to retreive data. I have this C# Method to obtain ServerApplicationContext private static ServerApplicationContext GetServerContext() { ServerApplicationContext serverContext = (LightSwitchApplication.ServerApplicationContext)ServerApplicationContext.Current; if...

Filtering data source so a user can only see their own info

c#,sql,visual-studio-lightswitch
On one of my screens I have a table that shows information about customer companies. Now I'm trying to filter the data source so a user from company X can only view the info for company X, and not the info for company Y or Z. I have created a...

How do I Allow an Active Directory group member to do anything in my LightSwitch HTML Client application?

visual-studio-lightswitch,lightswitch-2013
I've recently created my first lightswitch application but I have been struggeling to publish it to my IIS for anyone to use. Every guide I see sets specific rights to update or delete or to do any task in their application. This is NOT what I want.. I want to...