Site
Web
Home
Community
My Wall
Social Summary
Social Members
Social Profile
Social Group Directory
Social Group Details
About
LightSwitch Articles on C# Corner
Harold Glenn P Minerva Articles
LightSwitch Articles on Tek Freak
LightSwitch Articles on Jan Van der Haegen
LightSwitchFX
Blog
Forum
Downloads
Market
Amazon Store
Themes
JetFlow Themes
JetStreamBright Themes
JetStream Themes
JetPack Themes
Enterprise Themes
Business Themes
Designer Themes
Expression Themes
Shiny Themes
Shells
Minimal Shell
DELORDSON Shells
OutlookBar Shell
Shell Pack
TreeView Shell
Touch Strip Menu Shell
Tiled Menu Shell
Tabbed Menu Shell
Default Shell Top 2012
Default Shell
Default Shell 2012
Books
Creating Visual Studio LightSwitch Custom Controls
OData And Visual Studio LightSwitch
Visual Studio Gallery
Demos
Things For Sale
Call Log
Tank Game
Expense Report
You are here:
Forum
Register
|
Login
Forum Notice
For new Visual Studio LightSwitch questions,
It is recommended that you use the official Visual Studio LightSwitch Forums at:
http://social.msdn.microsoft.com/forums/en-US/lightswitch/threads
Forums
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Default Group
>
LightSwitch Beginners
Getting data from a query and using it on screen
Last Post 18 Jun 2012 05:54 AM by
Rhino2075@gmailc.com
. 2 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
RhinoSmith
New Member
Posts:2
17 Jun 2012 02:31 PM
I have a screen with several autocomplete boxes populated by queries and set up as 1 to many relationships. The queries and autocomplete boxes work as intended. I cannot, however, figure out how to access the other data in the query when the user selects it.
For instance, if a user selects a customer and that customer has several ship to addresses which are popluated in an autocomplete box based on the selected customer. The query works fine..the auto box shows the customers ship to names. But I need to popluate the screen with the acutal address data, i.e., address, city, state when the user changes the ship to.
Everything I've done through code only points to the first record in the query and not the one selected. It would seem that dragging the field onto the screen from the query would work, but it does not. I've used code in the property change event equivalent to Me.ScreenCityProperty=Me.query.City. This always points to the first record in the query and never for the selecteditem. This seems so simple to do.
Thanks in advance,
Rhino
hgminerva
Veteran Member
Posts:98
17 Jun 2012 04:43 PM
You can do this using Linq. Below is the pseudo code to get the idea:
Dim Addreses = (from s in
where s.id=
).firstordefault
if not isnothing(adresses) then
address = addresses.address
city = addresses.city
end if
http://hgminerva.wordpress.com
RhinoSmith
New Member
Posts:2
18 Jun 2012 05:54 AM
Thanks for your response hgminerva. I still think in terms of pulling data from a table that all the row data would be pulled in the query and accessable on from the screen. Guess that is not the case.
You are not authorized to post a reply.
Default Group
--LightSwitch Hackers
--Marketplace (find and offer services)
--LightSwitch Beginners
--LightSwitch Tips
--LightSwitch Community Announcements
--LightSwitch Hosting
--Vender Forums
----DELORDSON (LightSwitch Extras)
Forums
>
Default Group
>
LightSwitch Beginners
Latest Microsoft Visual Studio LightSwitch Forum Threads That Have Answers
Javascript Runtime Update 1 - 0x800a138f Unable to get property 'unit' of undefined or null
5/24/2013 9:03 AM
This is really strange ! After upgrading the lightswitch engine with Update 1, I'm suddenly unable to navigate forward to another screen (using myapp.showSomeScreen() ) from my home screen. Then, when I try to navigate back (using native previous arrow), I get the following error: TypeError: Unable to get property 'unit' of undefined or null reference at wu (http://localhost:19952/HTMLClient/Scripts/msls-1.0.1.min.js:5:230291) at au (
http://localhost:19952/HTMLClient/Scripts/msls-1.0.1.min.js:5:121782) at Anonymous function (
http://localhost:19952/HTMLClient/Scripts/msls-1.0.1.min.js:5:121648) at each (
http://localhost:19952/HTMLClient/Scripts/jquery-1.9.1.min.js:3:5250)
Read more...
Lightswitch tutorial: Unable to locate "OData Service"
5/23/2013 3:21 PM
I am following the Working with Data in LightSwitch (Guided Tour) at http://msdn.microsoft.com/en-us/library/ff851982.aspx, and at the "Connecting to Data" portion I am unable to choose "OData Service" in the Attach Data Source wizard. It just doesn't appear. See attached. What do need I to do to get "OData Service" to appear, so I can choose it? Thank you! - tom
Read more...
How to elevate permissions in entities related in a 1 to 0..1 relationship
5/22/2013 11:57 AM
The Lightswitch security available at this time is at the entity level. There is also Row Level Security, but, as far as I know, there is no Lightswitch security implemented at the property level According to this article:
http://blogs.msdn.com/b/lightswitch/archive/2012/04/17/filtering-data-using-entity-set-filters-michael-simons.aspx I took out the confidential properties of an entity A and put it into another entity B.
Then I define a 1 to 0..1 relationship between entity A and entity B. I also wrote the necessary code in the A_Created general method in order to create the related B entity. Now suppose that we have different permissions defined for the two entities for all CRUD operations. (Security concerns were the reason why I split the original entity) According to this article:
Read more...
Is there possibility of communication between HTML and Silverlight client in Lightswitch thru links
5/22/2013 5:50 AM
I would like to open HTML client screen from Silverlight client.
Read more...
Can you bind a Drop Down to a Query or dynamic data in the HTML client?
5/21/2013 3:41 PM
In the Silverlight client we had the Auto Complete Box that you could bind to either a Query or a Choice List based property. In the current HTML client we have the Drop Down control that you can bind to a Choice List based property only from what I can see. Questions: 1/ Can we bind a Drop Down control to a Query? 2/ Can we dynamically populate a Choice List in Javascript at run-time (this was not possible in the Silverlight client)? If neither of the above are possible, what is the recommended way to have Drop Downs that are based on a query or dynamic data? Thanks in advance Regards, Xander
Read more...
1
2
3
4
Microsoft Visual Studio is a registered trademark of Microsoft Corporation / LightSwitch is a registered trademark of Microsoft Corporation
Privacy Statement
|
Terms Of Use
Copyright 2011 by Michael Washington