lightswitch-2013

Lightswitch dates in Firefox displayed incorrectly

跟風遠走 提交于 2020-01-17 03:43:06
问题 Does anyone know why all dates display in the correct (UK based) dd/MM/yyyy format in Chrome and IE but in Firefox are set to MM/dd/yyyy format? Is there a workaround other than converting every date display to a custom control and using moment.js to render the date into the required format? PC is set to UK location in Control Panel. Thanks 回答1: Having encountered the same issue, and following some rabbit hole exploration in the msls library, we determined that the solution is to ensure the

Sorting data in Foreign key drop down lightswitch

自古美人都是妖i 提交于 2020-01-15 17:52:00
问题 I having country as Foreign key in one of the table. So it is shown as drop down(is it a drop down? see image above) My question is how can I specify the data in the drop down/input is to be in sorted order? 回答1: As Crezzer mentioned, the foreign key drop down details pickers are intrinsically sorted by entry order (with the earliest records appearing at the top). However, if you'd like to change this sort order, you simply need to add a sorted query against your countries table. This can be

Sorting data in Foreign key drop down lightswitch

拟墨画扇 提交于 2020-01-15 17:51:12
问题 I having country as Foreign key in one of the table. So it is shown as drop down(is it a drop down? see image above) My question is how can I specify the data in the drop down/input is to be in sorted order? 回答1: As Crezzer mentioned, the foreign key drop down details pickers are intrinsically sorted by entry order (with the earliest records appearing at the top). However, if you'd like to change this sort order, you simply need to add a sorted query against your countries table. This can be

how to debug delete button action in Lightswitch?

左心房为你撑大大i 提交于 2020-01-07 03:08:18
问题 I am supposed to find a bug in Lightswitch C# application written in VS2012 which causes application to hung when delete button is clicked. I am new to LS and have problem figuring out how to find the internal code is executed when that button is selected. Even when I try to override action of this button debugger doesn't stop there. Debugging just my code is turned off, on screen data binding I see some name I cannot find in the code. Anybody here has some experience with lightswitch to

Applying where clause to childcollection in LightSwitch query

依然范特西╮ 提交于 2019-12-13 05:26:02
问题 How can I have a where clause in a LightSwitch query against a child collection? In my example, every blog can have many comments and I want to write a query like this so that the admin see only the blog entries without any comments: query = query.Where(q => q.comment.Count() == 0).SingleOrDefault() I've included the SingleOrDefault() because I want the administrator to see only one item per query they can then add a comment and move to next item on the blog screen. When trying the above

Two versions of lightswitch desktop application

强颜欢笑 提交于 2019-12-13 05:19:32
问题 I have deployed a lightswitch application that is being used in a production environment. I recently made some changes and need to publish a separate copy installed alongside the original for testing purposes. I tried to look at this video1 on installing click-once applications side by side, but Lightswitch doesn't have the same options that a normal C# application has. I edited the assembly name in the desktop client project but no luck. Any suggestions? 回答1: I'm not sure if this is right,

Lightswitch 2013: Save then Refresh in JS

无人久伴 提交于 2019-12-13 05:18:12
问题 I have the 2 sets of code: Saves the data myapp.activeDataWorkspace.ProjectHandlerData.saveChanges(); 2.Refreshes the page window.location.reload(); is there a way to make both of these work together on one button, as currently when i click save, the browser recognizes the changes and the (are you sure you want to leave the page) message or something along those lines pops up.. cheers 回答1: This is for the HTML client, right? Assuming that is the case: saveChanges() is an asynchronous

LightSwitch HTML root screen layout extending beyond the screen when its height is set to “stretch to container”

五迷三道 提交于 2019-12-12 06:09:13
问题 Dears, If I have a screen and I set the root layout's height to "Stretch to Container" and make sure that no buttons are visible in the footer (So the footer is collapsed), you will notice that the page layout will extend unnecessarily beyond the height of the browser window (causing the scrollbar to appear), and it will extend exactly as much as the header (So if the header is 60px, the extra space at the bottom will be 60px). This looks unprofessional and as footer buttons appear and

Add image to lightswitch using local property and file location

烈酒焚心 提交于 2019-12-12 05:01:20
问题 just a quick question, is it possible to display a static image within a screen on lightswitch? I want to click "Add Data Item" -> select "Local Property" and Type "Image". Now unlike previous versions i cannot select a file path so i need to write some js via the post-Render section, what do i type in here? Thanks for any help you an give me, tried a few methods with no success. 回答1: Having recently tackled a similar situation we've implemented the following helper promise operation function

Lightswitch filter with multiple tables

你说的曾经没有我的故事 提交于 2019-12-12 01:47:57
问题 I am using lightswitch and I have a "Grid" with table A. Table A related to Table B and table b related to table C. Now how do I access data from table c using Grid's PreprocessQuery or filter? 回答1: You can expand each relationship in the query designer. Below I am creating a filter in the query designer on my QuoteLines table which has a relationship to my Quotes table which has a relationship to my RepFirms table which has a relationship to my InsideSalesReps table. You can filter on any