Category Archives: .NET

Returning Records With Children

Here I have a screen for searching Street addresses.  Tables are Continent, Country, City and Street.

The database contains many Countries and Cities which do not have addresses. To make the user experience better I only want to load the autocomplete boxes with Countries and Cities that have addresses. Continue reading


Globals In LightSwitch

I looked around the ‘net for how/where to create global variables in LightSwitch and one post showed how to do it for VB. For the life of me I couldn’t figure out how to do this in C#, so I decided to do it this way which I probably better anyway. It keeps more separation between native LightSwitch generated code and my own, which is probably what LS designers intended. Continue reading

Simple Show/Hide Of Screen Elements

LightSwitch uses the MVVM architechture which means everything is about data and has barely any abstraction between data and presentation layers.

In this example we have a cities table with columns visible_portal, pixel_x and pixel_y. When visible_portal is false, the pixel fields should be hidden from the screen. When visible_portal is true, they should be displayed on-screen and made mandatory. Continue reading